Skip to content

Commit 90b46ce

Browse files
hustcersholderbach
andauthored
Refresh Nu command docs for v0.101 (#1687)
* Refresh Nu command docs for v0.101 * Refresh Nu command docs for v0.101 --------- Co-authored-by: sholderbach <[email protected]>
1 parent 8943a68 commit 90b46ce

File tree

560 files changed

+1575
-822
lines changed

Some content is hidden

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

560 files changed

+1575
-822
lines changed

.vuepress/configs/sidebar/command_categories.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const commandCategories = [
1010
'/commands/categories/date.md',
1111
'/commands/categories/debug.md',
1212
'/commands/categories/default.md',
13+
'/commands/categories/deprecated.md',
1314
'/commands/categories/env.md',
1415
'/commands/categories/expression.md',
1516
'/commands/categories/filesystem.md',

commands/categories/deprecated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<th>Description</th>
2121
</tr>
2222
<tr v-for="command in commands">
23-
<td><a :href="command.path">{{ command.title }}</a></td>
23+
<td><a :href="$withBase(command.path)">{{ command.title }}</a></td>
2424
<td style="white-space: pre-wrap;">{{ command.frontmatter.usage }}</td>
2525
</tr>
2626
</table>

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.100.0
5+
version: 0.101.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.100.0
5+
version: 0.101.0
66
filters: |
77
Test if every element of the input fulfills a predicate expression.
88
usage: |

commands/docs/ansi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ansi
33
categories: |
44
platform
5-
version: 0.100.0
5+
version: 0.101.0
66
platform: |
77
Output ANSI codes to change color and style of text.
88
usage: |

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.100.0
5+
version: 0.101.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.100.0
5+
version: 0.101.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.100.0
5+
version: 0.101.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.100.0
5+
version: 0.101.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.100.0
5+
version: 0.101.0
66
filters: |
77
Append any number of rows to a table.
88
usage: |

commands/docs/ast.md

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ast
33
categories: |
44
debug
5-
version: 0.100.0
5+
version: 0.101.0
66
debug: |
77
Print the abstract syntax tree (ast) for a pipeline.
88
usage: |
@@ -20,8 +20,9 @@ usage: |
2020

2121
## Flags
2222

23-
- `--json, -j`: serialize to json
24-
- `--minify, -m`: minify the nuon or json output
23+
- `--json, -j`: Serialize to json
24+
- `--minify, -m`: Minify the nuon or json output
25+
- `--flatten, -f`: An easier to read version of the ast
2526

2627
## Parameters
2728

@@ -30,9 +31,9 @@ usage: |
3031

3132
## Input/output types:
3233

33-
| input | output |
34-
| ------ | ------ |
35-
| string | record |
34+
| input | output |
35+
| ------- | ------ |
36+
| nothing | table |
3637

3738
## Examples
3839

@@ -65,3 +66,57 @@ Print the ast of a pipeline with an error, as json, minified
6566
> ast 'for x in 1..10 { echo $x ' --json --minify
6667
6768
```
69+
70+
Print the ast of a string flattened
71+
```nu
72+
> ast "'hello'" --flatten
73+
╭───┬─────────┬──────────────┬───────────────╮
74+
│ # │ content │ shape │ span │
75+
├───┼─────────┼──────────────┼───────────────┤
76+
│ 0 │ 'hello' │ shape_string │ ╭───────┬───╮ │
77+
│ │ │ │ │ start │ 0 │ │
78+
│ │ │ │ │ end │ 7 │ │
79+
│ │ │ │ ╰───────┴───╯ │
80+
╰───┴─────────┴──────────────┴───────────────╯
81+
82+
```
83+
84+
Print the ast of a string flattened, as json, minified
85+
```nu
86+
> ast "'hello'" --flatten --json --minify
87+
[{"content":"'hello'","shape":"shape_string","span":{"start":0,"end":7}}]
88+
```
89+
90+
Print the ast of a pipeline flattened
91+
```nu
92+
> ast 'ls | sort-by type name -i' --flatten
93+
╭───┬─────────┬────────────────────┬────────────────╮
94+
│ # │ content │ shape │ span │
95+
├───┼─────────┼────────────────────┼────────────────┤
96+
│ 0 │ ls │ shape_external │ ╭───────┬───╮ │
97+
│ │ │ │ │ start │ 0 │ │
98+
│ │ │ │ │ end │ 2 │ │
99+
│ │ │ │ ╰───────┴───╯ │
100+
│ 1 │ | │ shape_pipe │ ╭───────┬───╮ │
101+
│ │ │ │ │ start │ 3 │ │
102+
│ │ │ │ │ end │ 4 │ │
103+
│ │ │ │ ╰───────┴───╯ │
104+
│ 2 │ sort-by │ shape_internalcall │ ╭───────┬────╮ │
105+
│ │ │ │ │ start │ 5 │ │
106+
│ │ │ │ │ end │ 12 │ │
107+
│ │ │ │ ╰───────┴────╯ │
108+
│ 3 │ type │ shape_string │ ╭───────┬────╮ │
109+
│ │ │ │ │ start │ 13 │ │
110+
│ │ │ │ │ end │ 17 │ │
111+
│ │ │ │ ╰───────┴────╯ │
112+
│ 4 │ name │ shape_string │ ╭───────┬────╮ │
113+
│ │ │ │ │ start │ 18 │ │
114+
│ │ │ │ │ end │ 22 │ │
115+
│ │ │ │ ╰───────┴────╯ │
116+
│ 5 │ -i │ shape_flag │ ╭───────┬────╮ │
117+
│ │ │ │ │ start │ 23 │ │
118+
│ │ │ │ │ end │ 25 │ │
119+
│ │ │ │ ╰───────┴────╯ │
120+
╰───┴─────────┴────────────────────┴────────────────╯
121+
122+
```

commands/docs/banner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: banner
33
categories: |
44
default
5-
version: 0.100.0
5+
version: 0.101.0
66
default: |
77
Print a banner for nushell with information about the project
88
usage: |

commands/docs/bits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Various commands for working with bits.
88
usage: |

commands/docs/bits_and.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits and
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Performs bitwise and for ints or binary values.
88
usage: |

commands/docs/bits_not.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits not
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Performs logical negation on each bit.
88
usage: |

commands/docs/bits_or.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits or
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Performs bitwise or for ints or binary values.
88
usage: |

commands/docs/bits_rol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits rol
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Bitwise rotate left for ints or binary values.
88
usage: |

commands/docs/bits_ror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits ror
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Bitwise rotate right for ints or binary values.
88
usage: |

commands/docs/bits_shl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits shl
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Bitwise shift left for ints or binary values.
88
usage: |

commands/docs/bits_shr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits shr
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Bitwise shift right for ints or binary values.
88
usage: |

commands/docs/bits_xor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bits xor
33
categories: |
44
bits
5-
version: 0.100.0
5+
version: 0.101.0
66
bits: |
77
Performs bitwise xor for ints or binary values.
88
usage: |

commands/docs/break.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: break
33
categories: |
44
core
5-
version: 0.100.0
5+
version: 0.101.0
66
core: |
77
Break a loop.
88
usage: |

commands/docs/bytes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Various commands for working with byte data.
88
usage: |

commands/docs/bytes_add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes add
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Add specified bytes to the input.
88
usage: |

commands/docs/bytes_at.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes at
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Get bytes defined by a range.
88
usage: |

commands/docs/bytes_build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes build
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Create bytes from the arguments.
88
usage: |

commands/docs/bytes_collect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes collect
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Concatenate multiple binary into a single binary, with an optional separator between each.
88
usage: |

commands/docs/bytes_ends-with.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes ends-with
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Check if bytes ends with a pattern.
88
usage: |

commands/docs/bytes_index-of.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes index-of
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Returns start index of first occurrence of pattern in bytes, or -1 if no match.
88
usage: |

commands/docs/bytes_length.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes length
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Output the length of any bytes in the pipeline.
88
usage: |

commands/docs/bytes_remove.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes remove
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Remove bytes.
88
usage: |

commands/docs/bytes_replace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes replace
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Find and replace binary.
88
usage: |

commands/docs/bytes_reverse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes reverse
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Reverse the bytes in the pipeline.
88
usage: |

commands/docs/bytes_starts-with.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: bytes starts-with
33
categories: |
44
bytes
5-
version: 0.100.0
5+
version: 0.101.0
66
bytes: |
77
Check if bytes starts with a pattern.
88
usage: |

commands/docs/cal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: cal
33
categories: |
44
generators
5-
version: 0.100.0
5+
version: 0.101.0
66
generators: |
77
Display a calendar.
88
usage: |

0 commit comments

Comments
 (0)