Skip to content

Commit 74bf464

Browse files
authored
Refresh Nu command docs for v0.106.0 (#1986)
1 parent 998fa4c commit 74bf464

File tree

593 files changed

+978
-838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

593 files changed

+978
-838
lines changed

commands/docs/alias.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: alias
33
categories: |
44
core
5-
version: 0.105.0
5+
version: 0.106.0
66
core: |
77
Alias a command (with optional flags) to a new name.
88
usage: |

commands/docs/all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: all
33
categories: |
44
filters
5-
version: 0.105.0
5+
version: 0.106.0
66
filters: |
77
Test if every element of the input fulfills a predicate expression.
88
usage: |

commands/docs/ansi.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ansi
33
categories: |
44
platform
5-
version: 0.105.0
5+
version: 0.106.0
66
platform: |
77
Output ANSI codes to change color and style of text.
88
usage: |
@@ -44,7 +44,7 @@ Change color to green (see how the next example text will be green!)
4444
4545
```
4646

47-
Reset the color
47+
Reset all styles and colors
4848
```nu
4949
> ansi reset
5050
@@ -58,16 +58,28 @@ Hello Nu World
5858

5959
The same example as above with short names
6060
```nu
61-
> $'(ansi rb)Hello(ansi reset) (ansi gd)Nu(ansi reset) (ansi pi)World(ansi reset)'
61+
> $'(ansi rb)Hello(ansi rst) (ansi gd)Nu(ansi rst) (ansi pi)World(ansi rst)'
6262
Hello Nu World
6363
```
6464

65+
Avoid resetting color when setting/resetting different style codes
66+
```nu
67+
> $'Set color to (ansi g)GREEN then style to (ansi bo)BOLD(ansi rst_bo) or (ansi d)DIMMED(ansi rst_d) or (ansi i)ITALICS(ansi rst_i) or (ansi u)UNDERLINE(ansi rst_u) or (ansi re)REVERSE(ansi rst_re) or (ansi h)HIDDEN(ansi rst_h) or (ansi s)STRIKE(ansi rst_s) then (ansi rst)reset everything'
68+
Set color to GREEN then style to BOLD or DIMMED or ITALICS or UNDERLINE or REVERSE or HIDDEN or STRIKE then reset everything
69+
```
70+
6571
Use escape codes, without the '\x1b['
6672
```nu
6773
> $"(ansi --escape '3;93;41m')Hello(ansi reset)" # italic bright yellow on red background
6874
Hello
6975
```
7076

77+
Use simple hex string
78+
```nu
79+
> $"(ansi '#4169E1')Hello(ansi reset)" # royal blue foreground color
80+
Hello
81+
```
82+
7183
Use structured escape codes
7284
```nu
7385
> let bold_blue_on_red = { # `fg`, `bg`, `attr` are the acceptable keys, all other keys are considered invalid and will throw errors.
@@ -110,21 +122,30 @@ Escape sequences usual values:
110122
│ 17 │ background │ 49 │ │ default │
111123
╰────┴────────────┴────────┴────────┴─────────╯
112124
113-
Escape sequences attributes:
114-
╭───┬────┬──────────────┬──────────────────────────────╮
115-
│ # │ id │ abbreviation │ description │
116-
├───┼────┼──────────────┼──────────────────────────────┤
117-
│ 0 │ 0 │ │ reset / normal display │
118-
│ 1 │ 1 │ b │ bold or increased intensity │
119-
│ 2 │ 2 │ d │ faint or decreased intensity │
120-
│ 3 │ 3 │ i │ italic on (non-mono font) │
121-
│ 4 │ 4 │ u │ underline on │
122-
│ 5 │ 5 │ l │ slow blink on │
123-
│ 6 │ 6 │ │ fast blink on │
124-
│ 7 │ 7 │ r │ reverse video on │
125-
│ 8 │ 8 │ h │ nondisplayed (invisible) on │
126-
│ 9 │ 9 │ s │ strike-through on │
127-
╰───┴────┴──────────────┴──────────────────────────────╯
125+
Escape sequences style attributes:
126+
╭────┬────┬──────────────┬─────────────────────────────────────────╮
127+
│ # │ id │ abbreviation │ description │
128+
├────┼────┼──────────────┼─────────────────────────────────────────┤
129+
│ 0 │ 0 │ rst │ reset / normal display │
130+
│ 1 │ 1 │ bo │ bold on │
131+
│ 2 │ 2 │ d │ dimmed on │
132+
│ 3 │ 3 │ i │ italic on (non-mono font) │
133+
│ 4 │ 4 │ u │ underline on │
134+
│ 5 │ 5 │ bl │ blink on │
135+
│ 6 │ 6 │ bf │ fast blink on │
136+
│ 7 │ 7 │ r │ reverse video on │
137+
│ 8 │ 8 │ h │ hidden (invisible) on │
138+
│ 9 │ 9 │ s │ strike-through on │
139+
│ 10 │ 21 │ rst_bo │ bold or dimmed off │
140+
│ 11 │ 22 │ du │ double underline (not widely supported) │
141+
│ 12 │ 23 │ rst_i │ italic off (non-mono font) │
142+
│ 13 │ 24 │ rst_u │ underline off │
143+
│ 14 │ 25 │ rst_bl │ blink off │
144+
│ 15 │ 26 │ │ <reserved> │
145+
│ 16 │ 27 │ rst_r │ reverse video off │
146+
│ 17 │ 28 │ rst_h │ hidden (invisible) off │
147+
│ 18 │ 29 │ rst_s │ strike-through off │
148+
╰────┴────┴──────────────┴─────────────────────────────────────────╯
128149
129150
Operating system commands:
130151
╭───┬─────┬───────────────────────────────────────╮

commands/docs/ansi_gradient.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ansi gradient
33
categories: |
44
platform
5-
version: 0.105.0
5+
version: 0.106.0
66
platform: |
77
Add a color gradient (using ANSI color codes) to the given string.
88
usage: |

commands/docs/ansi_link.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ansi link
33
categories: |
44
platform
5-
version: 0.105.0
5+
version: 0.106.0
66
platform: |
77
Add a link (using OSC 8 escape sequence) to the given string.
88
usage: |

commands/docs/ansi_strip.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ansi strip
33
categories: |
44
platform
5-
version: 0.105.0
5+
version: 0.106.0
66
platform: |
77
Strip ANSI escape sequences from a string.
88
usage: |

commands/docs/any.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: any
33
categories: |
44
filters
5-
version: 0.105.0
5+
version: 0.106.0
66
filters: |
77
Tests if any element of the input fulfills a predicate expression.
88
usage: |

commands/docs/append.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: append
33
categories: |
44
filters
5-
version: 0.105.0
5+
version: 0.106.0
66
filters: |
77
Append any number of rows to a table.
88
usage: |

commands/docs/ast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ast
33
categories: |
44
debug
5-
version: 0.105.0
5+
version: 0.106.0
66
debug: |
77
Print the abstract syntax tree (ast) for a pipeline.
88
usage: |

commands/docs/attr_category.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: attr category
33
categories: |
44
core
5-
version: 0.105.0
5+
version: 0.106.0
66
core: |
77
Attribute for adding a category to custom commands.
88
usage: |

0 commit comments

Comments
 (0)