Skip to content

Commit

Permalink
add env fallback example (nushell#1226)
Browse files Browse the repository at this point in the history
* [placeholder] How can you use a variable fallback?

* fix placeholder fallback

---------

Co-authored-by: Darren Schroeder <[email protected]>
  • Loading branch information
c4lliope and fdncred authored Feb 3, 2024
1 parent bbb1456 commit 2a0862e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions book/coming_from_bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Note: this table assumes Nu 0.60.0 or later.
| `FOO=BAR ./bin` | `FOO=BAR ./bin` | Update environment temporarily |
| `export FOO=BAR` | `$env.FOO = BAR` | Set environment variable for current session |
| `echo $FOO` | `$env.FOO` | Use environment variables |
| `echo ${FOO:-fallback}` | `$env.FOO? | default "ABC"` | Use a fallback in place of an unset variable |
| `unset FOO` | `hide-env FOO` | Unset environment variable for current session |
| `alias s="git status -sb"` | `alias s = git status -sb` | Define an alias temporarily |
| `type FOO` | `which FOO` | Display information about a command (builtin, alias, or executable) |
Expand Down

0 comments on commit 2a0862e

Please sign in to comment.