Skip to content

Commit 218f600

Browse files
committed
Refresh commands
1 parent 626b4fe commit 218f600

32 files changed

+229
-0
lines changed

book/commands/alias.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ usage: |
1919
- `name`: name of the alias
2020
- `initial_value`: equals sign followed by value
2121

22+
## Notes
23+
```text
24+
This command is a parser keyword. For details, check
25+
https://www.nushell.sh/book/thinking_in_nushell.html#parsing-and-evaluation-are-different-stages
26+
```
2227
## Examples
2328

2429
Alias ll to ls -l

book/commands/ansi.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,51 @@ usage: |
2121
- `--osc`: operating system command (ocs) escape sequence without the escape character(s)
2222
- `--list`: list available ansi code names
2323

24+
## Notes
25+
```text
26+
For escape sequences:
27+
Escape: '\x1b[' is not required for --escape parameter
28+
Format: #(;#)m
29+
Example: 1;31m for bold red or 2;37;41m for dimmed white fg with red bg
30+
There can be multiple text formatting sequence numbers
31+
separated by a ; and ending with an m where the # is of the
32+
following values:
33+
attribute_number, abbreviation, description
34+
0 reset / normal display
35+
1 b bold or increased intensity
36+
2 d faint or decreased intensity
37+
3 i italic on (non-mono font)
38+
4 u underline on
39+
5 l slow blink on
40+
6 fast blink on
41+
7 r reverse video on
42+
8 h nondisplayed (invisible) on
43+
9 s strike-through on
44+
45+
foreground/bright colors background/bright colors
46+
30/90 black 40/100 black
47+
31/91 red 41/101 red
48+
32/92 green 42/102 green
49+
33/93 yellow 43/103 yellow
50+
34/94 blue 44/104 blue
51+
35/95 magenta 45/105 magenta
52+
36/96 cyan 46/106 cyan
53+
37/97 white 47/107 white
54+
39 default 49 default
55+
https://en.wikipedia.org/wiki/ANSI_escape_code
56+
57+
OSC: '\x1b]' is not required for --osc parameter
58+
Example: echo [(ansi -o '0') 'some title' (char bel)] | str collect
59+
Format: #
60+
0 Set window title and icon name
61+
1 Set icon name
62+
2 Set window title
63+
4 Set/read color palette
64+
9 iTerm2 Grown notifications
65+
10 Set foreground color (x11 color spec)
66+
11 Set background color (x11 color spec)
67+
... others
68+
```
2469
## Examples
2570

2671
Change color to green

book/commands/date_to-timezone.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ usage: |
1818

1919
- `time zone`: time zone description
2020

21+
## Notes
22+
```text
23+
Use 'date list-timezone' to list all supported time zones.
24+
```
2125
## Examples
2226

2327
Get the current date in UTC+05:00

book/commands/decode.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ usage: |
1818

1919
- `encoding`: the text encoding to use
2020

21+
## Notes
22+
```text
23+
Multiple encodings are supported, here is an example of a few:
24+
big5, euc-jp, euc-kr, gbk, iso-8859-1, utf-16, cp1252, latin5
25+
26+
For a more complete list of encodings please refer to the encoding_rs
27+
documentation link at https://docs.rs/encoding_rs/0.8.28/encoding_rs/#statics
28+
```
2129
## Examples
2230

2331
Decode the output of an external command

book/commands/def-env.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ usage: |
2020
- `params`: parameters
2121
- `block`: body of the definition
2222

23+
## Notes
24+
```text
25+
This command is a parser keyword. For details, check
26+
https://www.nushell.sh/book/thinking_in_nushell.html#parsing-and-evaluation-are-different-stages
27+
```
2328
## Examples
2429

2530
Set environment variable by call a custom command

book/commands/def.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ usage: |
2020
- `params`: parameters
2121
- `block`: body of the definition
2222

23+
## Notes
24+
```text
25+
This command is a parser keyword. For details, check
26+
https://www.nushell.sh/book/thinking_in_nushell.html#parsing-and-evaluation-are-different-stages
27+
```
2328
## Examples
2429

2530
Define a command and run it

book/commands/dfr_as-date.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ usage: |
1919
- `format`: formatting date string
2020
- `--not-exact`: the format string may be contained in the date (e.g. foo-2021-01-01-bar could match 2021-01-01)
2121

22+
## Notes
23+
```text
24+
Format example:
25+
"%Y-%m-%d" => 2021-12-31
26+
"%d-%m-%Y" => 31-12-2021
27+
"%Y%m%d" => 2021319 (2021-03-19)
28+
```
2229
## Examples
2330

2431
Converts string to date

book/commands/dfr_as-datetime.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ usage: |
1919
- `format`: formatting date time string
2020
- `--not-exact`: the format string may be contained in the date (e.g. foo-2021-01-01-bar could match 2021-01-01)
2121

22+
## Notes
23+
```text
24+
Format example:
25+
"%y/%m/%d %H:%M:%S" => 21/12/31 12:54:98
26+
"%y-%m-%d %H:%M:%S" => 2021-12-31 24:58:01
27+
"%y/%m/%d %H:%M:%S" => 21/12/31 24:58:01
28+
"%y%m%d %H:%M:%S" => 210319 23:58:50
29+
"%Y/%m/%d %H:%M:%S" => 2021/12/31 12:54:98
30+
"%Y-%m-%d %H:%M:%S" => 2021-12-31 24:58:01
31+
"%Y/%m/%d %H:%M:%S" => 2021/12/31 24:58:01
32+
"%Y%m%d %H:%M:%S" => 20210319 23:58:50
33+
"%FT%H:%M:%S" => 2019-04-18T02:45:55
34+
"%FT%H:%M:%S.%6f" => microseconds
35+
"%FT%H:%M:%S.%9f" => nanoseconds
36+
```
2237
## Examples
2338

2439
Converts string to datetime

book/commands/exec.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ usage: |
1919
- `command`: the command to execute
2020
- `...rest`: any additional arguments for the command
2121

22+
## Notes
23+
```text
24+
Currently supported only on Unix-based systems.
25+
```
2226
## Examples
2327

2428
Execute external 'ps aux' tool

book/commands/export.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ usage: |
1414

1515
```> export ```
1616

17+
## Notes
18+
```text
19+
This command is a parser keyword. For details, check
20+
https://www.nushell.sh/book/thinking_in_nushell.html#parsing-and-evaluation-are-different-stages
21+
```
1722
## Examples
1823

1924
Export a definition from a module

0 commit comments

Comments
 (0)