Skip to content

Commit 0e7bda2

Browse files
Added $? equivalent to $env.LAST_EXIT_CODE (#1757)
1 parent 10a2afc commit 0e7bda2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

book/coming_from_bash.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ $env.Path = ($env.Path | prepend 'C:\Program Files\Git\usr\bin')
5656
| `echo /tmp/$RANDOM` | `$"/tmp/(random int)"` | Use command output in a string |
5757
| `cargo b --jobs=$(nproc)` | `cargo b $"--jobs=(sys cpu \| length)"` | Use command output in an option |
5858
| `echo $PATH` | `$env.PATH` (Non-Windows) or `$env.Path` (Windows) | See the current path |
59+
| `echo $?` | `$env.LAST_EXIT_CODE` | See the exit status of the last executed command |
5960
| `<update ~/.bashrc>` | `vim $nu.config-path` | Update PATH permanently |
6061
| `export PATH = $PATH:/usr/other/bin` | `$env.PATH = ($env.PATH \| append /usr/other/bin)` | Update PATH temporarily |
6162
| `export` | `$env` | List the current environment variables |

0 commit comments

Comments
 (0)