Skip to content

Refresh Nu command docs for v0.106.0 #1986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion commands/docs/alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: alias
categories: |
core
version: 0.105.0
version: 0.106.0
core: |
Alias a command (with optional flags) to a new name.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/all.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: all
categories: |
filters
version: 0.105.0
version: 0.106.0
filters: |
Test if every element of the input fulfills a predicate expression.
usage: |
Expand Down
57 changes: 39 additions & 18 deletions commands/docs/ansi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ansi
categories: |
platform
version: 0.105.0
version: 0.106.0
platform: |
Output ANSI codes to change color and style of text.
usage: |
Expand Down Expand Up @@ -44,7 +44,7 @@ Change color to green (see how the next example text will be green!)

```

Reset the color
Reset all styles and colors
```nu
> ansi reset

Expand All @@ -58,16 +58,28 @@ Hello Nu World

The same example as above with short names
```nu
> $'(ansi rb)Hello(ansi reset) (ansi gd)Nu(ansi reset) (ansi pi)World(ansi reset)'
> $'(ansi rb)Hello(ansi rst) (ansi gd)Nu(ansi rst) (ansi pi)World(ansi rst)'
Hello Nu World
```

Avoid resetting color when setting/resetting different style codes
```nu
> $'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'
Set color to GREEN then style to BOLD or DIMMED or ITALICS or UNDERLINE or REVERSE or HIDDEN or STRIKE then reset everything
```

Use escape codes, without the '\x1b['
```nu
> $"(ansi --escape '3;93;41m')Hello(ansi reset)" # italic bright yellow on red background
Hello
```

Use simple hex string
```nu
> $"(ansi '#4169E1')Hello(ansi reset)" # royal blue foreground color
Hello
```

Use structured escape codes
```nu
> let bold_blue_on_red = { # `fg`, `bg`, `attr` are the acceptable keys, all other keys are considered invalid and will throw errors.
Expand Down Expand Up @@ -110,21 +122,30 @@ Escape sequences usual values:
│ 17 │ background │ 49 │ │ default │
╰────┴────────────┴────────┴────────┴─────────╯

Escape sequences attributes:
╭───┬────┬──────────────┬──────────────────────────────╮
│ # │ id │ abbreviation │ description │
├───┼────┼──────────────┼──────────────────────────────┤
│ 0 │ 0 │ │ reset / normal display │
│ 1 │ 1 │ b │ bold or increased intensity │
│ 2 │ 2 │ d │ faint or decreased intensity │
│ 3 │ 3 │ i │ italic on (non-mono font) │
│ 4 │ 4 │ u │ underline on │
│ 5 │ 5 │ l │ slow blink on │
│ 6 │ 6 │ │ fast blink on │
│ 7 │ 7 │ r │ reverse video on │
│ 8 │ 8 │ h │ nondisplayed (invisible) on │
│ 9 │ 9 │ s │ strike-through on │
╰───┴────┴──────────────┴──────────────────────────────╯
Escape sequences style attributes:
╭────┬────┬──────────────┬─────────────────────────────────────────╮
│ # │ id │ abbreviation │ description │
├────┼────┼──────────────┼─────────────────────────────────────────┤
│ 0 │ 0 │ rst │ reset / normal display │
│ 1 │ 1 │ bo │ bold on │
│ 2 │ 2 │ d │ dimmed on │
│ 3 │ 3 │ i │ italic on (non-mono font) │
│ 4 │ 4 │ u │ underline on │
│ 5 │ 5 │ bl │ blink on │
│ 6 │ 6 │ bf │ fast blink on │
│ 7 │ 7 │ r │ reverse video on │
│ 8 │ 8 │ h │ hidden (invisible) on │
│ 9 │ 9 │ s │ strike-through on │
│ 10 │ 21 │ rst_bo │ bold or dimmed off │
│ 11 │ 22 │ du │ double underline (not widely supported) │
│ 12 │ 23 │ rst_i │ italic off (non-mono font) │
│ 13 │ 24 │ rst_u │ underline off │
│ 14 │ 25 │ rst_bl │ blink off │
│ 15 │ 26 │ │ <reserved> │
│ 16 │ 27 │ rst_r │ reverse video off │
│ 17 │ 28 │ rst_h │ hidden (invisible) off │
│ 18 │ 29 │ rst_s │ strike-through off │
╰────┴────┴──────────────┴─────────────────────────────────────────╯

Operating system commands:
╭───┬─────┬───────────────────────────────────────╮
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/ansi_gradient.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ansi gradient
categories: |
platform
version: 0.105.0
version: 0.106.0
platform: |
Add a color gradient (using ANSI color codes) to the given string.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/ansi_link.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ansi link
categories: |
platform
version: 0.105.0
version: 0.106.0
platform: |
Add a link (using OSC 8 escape sequence) to the given string.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/ansi_strip.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ansi strip
categories: |
platform
version: 0.105.0
version: 0.106.0
platform: |
Strip ANSI escape sequences from a string.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/any.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: any
categories: |
filters
version: 0.105.0
version: 0.106.0
filters: |
Tests if any element of the input fulfills a predicate expression.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/append.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: append
categories: |
filters
version: 0.105.0
version: 0.106.0
filters: |
Append any number of rows to a table.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/ast.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ast
categories: |
debug
version: 0.105.0
version: 0.106.0
debug: |
Print the abstract syntax tree (ast) for a pipeline.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/attr_category.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: attr category
categories: |
core
version: 0.105.0
version: 0.106.0
core: |
Attribute for adding a category to custom commands.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/attr_deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: attr deprecated
categories: |
core
version: 0.105.0
version: 0.106.0
core: |
Attribute for marking a command or flag as deprecated.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/attr_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: attr example
categories: |
core
version: 0.105.0
version: 0.106.0
core: |
Attribute for adding examples to custom commands.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/attr_search-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: attr search-terms
categories: |
core
version: 0.105.0
version: 0.106.0
core: |
Attribute for adding search terms to custom commands.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/banner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: banner
categories: |
default
version: 0.105.0
version: 0.106.0
default: |
Print a banner for Nushell with information about the project
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Various commands for working with bits.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_and.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits and
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Performs bitwise and for ints or binary values.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_not.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits not
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Performs logical negation on each bit.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_or.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits or
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Performs bitwise or for ints or binary values.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_rol.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits rol
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Bitwise rotate left for ints or binary values.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_ror.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits ror
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Bitwise rotate right for ints or binary values.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_shl.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits shl
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Bitwise shift left for ints or binary values.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_shr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits shr
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Bitwise shift right for ints or binary values.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bits_xor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bits xor
categories: |
bits
version: 0.105.0
version: 0.106.0
bits: |
Performs bitwise xor for ints or binary values.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/break.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: break
categories: |
core
version: 0.105.0
version: 0.106.0
core: |
Break a loop.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Various commands for working with byte data.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes add
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Add specified bytes to the input.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_at.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes at
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Get bytes defined by a range.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes build
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Create bytes from the arguments.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_collect.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes collect
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Concatenate multiple binary into a single binary, with an optional separator between each.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_ends-with.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes ends-with
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Check if bytes ends with a pattern.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_index-of.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes index-of
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Returns start index of first occurrence of pattern in bytes, or -1 if no match.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_length.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes length
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Output the length of any bytes in the pipeline.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes remove
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Remove bytes.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_replace.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes replace
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Find and replace binary.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion commands/docs/bytes_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bytes reverse
categories: |
bytes
version: 0.105.0
version: 0.106.0
bytes: |
Reverse the bytes in the pipeline.
usage: |
Expand Down
Loading