@@ -7,7 +7,7 @@ To make these commands available in `nu` as well, add the following line to your
7
7
$env.Path = ($env.Path | prepend 'C:\Program Files\Git\usr\bin')
8
8
```
9
9
10
- Note: this table assumes Nu 0.60 .0 or later.
10
+ Note: this table assumes Nu 0.91 .0 or later.
11
11
12
12
| Bash | Nu | Task |
13
13
| ------------------------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------- |
@@ -17,18 +17,20 @@ Note: this table assumes Nu 0.60.0 or later.
17
17
| ` ls -la ` | ` ls --long --all ` or ` ls -la ` | List files with all available information, including hidden files |
18
18
| ` ls -d */ ` | ` ls \| where type == dir ` | List directories |
19
19
| ` find . -name *.rs ` | ` ls **/*.rs ` | Find recursively all files that match a given pattern |
20
- | ` find . -name Makefile \| xargs vim ` | ` ls **/Makefile \| get name \| vim $in ` | Pass values as command parameters |
20
+ | ` find . -name Makefile \| xargs vim ` | ` ls **/Makefile \| get name \| vim ... $in ` | Pass values as command parameters |
21
21
| ` cd <directory> ` | ` cd <directory> ` | Change to the given directory |
22
22
| ` cd ` | ` cd ` | Change to the home directory |
23
23
| ` cd - ` | ` cd - ` | Change to the previous directory |
24
24
| ` mkdir <path> ` | ` mkdir <path> ` | Creates the given path |
25
25
| ` mkdir -p <path> ` | ` mkdir <path> ` | Creates the given path, creating parents as necessary |
26
26
| ` touch test.txt ` | ` touch test.txt ` | Create a file |
27
- | ` > <path> ` | ` \| save --raw <path> ` | Save string into a file |
28
- | ` >> <path> ` | ` \| save --raw --append <path> ` | Append string to a file |
27
+ | ` > <path> ` | ` out> <path> ` or ` o> <path> ` | Save command output to a file |
28
+ | | ` \| save <path> ` | Save command output to a file as structured data |
29
+ | ` >> <path> ` | ` out>> <path> ` or ` o>> <path> ` | Append command output to a file |
30
+ | | ` \| save --append <path> ` | Append command output to a file as structured data |
29
31
| ` > /dev/null ` | ` \| ignore ` | Discard command output |
30
- | ` > /dev/null 2>&1 ` | ` out+err> /dev/null ` | Discard command output, including stderr |
31
- | ` command arg1 arg2 2>&1 \| less ` | ` run-external --redirect-combine command [arg1 arg2] \| less` | Pipe stdout+ stderr of a command into less, output updated live |
32
+ | ` > /dev/null 2>&1 ` | ` out+err>\| ignore ` or ` o+e>\| ignore ` | Discard command output, including stderr |
33
+ | ` command 2>&1 \| less ` | ` command out+err>\| less ` or ` command o+e> \| less` | Pipe stdout and stderr of a command into less |
32
34
| ` cmd1 \| tee log.txt \| cmd2 ` | ` cmd1 \| tee { save log.txt } \| cmd2 ` | Tee command output to a log file |
33
35
| ` cat <path> ` | ` open --raw <path> ` | Display the contents of the given file |
34
36
| | ` open <path> ` | Read a file as structured data |
0 commit comments