Skip to content

Commit 44c487c

Browse files
authored
Add missing cmd to nu command (#1637)
Add if defined expression via `scope variables`
1 parent 0ae1497 commit 44c487c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/coming_from_cmd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This table was last updated for Nu 0.67.0.
3232
| `IF ERRORLEVEL <number> <command>` | `if $env.LAST_EXIT_CODE >= <number> { <command> }` | Run a command if the last command returned an error code >= specified |
3333
| `IF <string> EQU <string> <command>` | `if <string> == <string> { <command> }` | Run a command if strings match |
3434
| `IF EXIST <filename> <command>` | `if (<filename> \| path exists) { <command> }` | Run a command if the file exists |
35-
| `IF DEFINED <variable> <command>` | | Run a command if the variable is defined |
35+
| `IF DEFINED <variable> <command>` | `if (scope variables \| any {\|var\| $var.name == '<variable>'}) { <command> }` | Run a command if the variable is defined |
3636
| `MD` or `MKDIR` | `mkdir` | Create directories |
3737
| `MKLINK` | | Create symbolic links |
3838
| `MOVE` | `mv` | Move files |

0 commit comments

Comments
 (0)