Skip to content

Refresh Nu command docs for v0.103 #1835

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 5 commits into from
Mar 19, 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 .vuepress/configs/sidebar/command_categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const commandCategories = [
'/commands/categories/date.md',
'/commands/categories/debug.md',
'/commands/categories/default.md',
'/commands/categories/deprecated.md',
'/commands/categories/env.md',
'/commands/categories/experimental.md',
'/commands/categories/expression.md',
'/commands/categories/filesystem.md',
'/commands/categories/filters.md',
Expand Down
25 changes: 17 additions & 8 deletions commands/categories/experimental.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
editLink: false
contributors: false
---

# Experimental

<script>
Expand All @@ -15,12 +20,16 @@
</script>

<table>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
<tr v-for="command in commands">
<td><a :href="$withBase(command.path)">{{ command.title }}</a></td>
<td style="white-space: pre-wrap;">{{ command.frontmatter.usage }}</td>
</tr>
<thead>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr v-for="command in commands">
<td><a :href="$withBase(command.path)">{{ command.title }}</a></td>
<td style="white-space: pre-wrap;">{{ command.frontmatter.usage }}</td>
</tr>
</tbody>
</table>
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.102.0
version: 0.103.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.102.0
version: 0.103.0
filters: |
Test if every element of the input fulfills a predicate expression.
usage: |
Expand Down
2 changes: 1 addition & 1 deletion 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.102.0
version: 0.103.0
platform: |
Output ANSI codes to change color and style of text.
usage: |
Expand Down
4 changes: 2 additions & 2 deletions 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.102.0
version: 0.103.0
platform: |
Add a color gradient (using ANSI color codes) to the given string.
usage: |
Expand All @@ -29,7 +29,7 @@ contributors: false

## Parameters

- `...rest`: for a data structure input, add a gradient to strings at the given cell paths
- `...rest`: For a data structure input, add a gradient to strings at the given cell paths.


## Input/output types:
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.102.0
version: 0.103.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.102.0
version: 0.103.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.102.0
version: 0.103.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.102.0
version: 0.103.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.102.0
version: 0.103.0
debug: |
Print the abstract syntax tree (ast) for a pipeline.
usage: |
Expand Down
42 changes: 42 additions & 0 deletions commands/docs/attr_category.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: attr category
categories: |
core
version: 0.103.0
core: |
Attribute for adding a category to custom commands.
usage: |
Attribute for adding a category to custom commands.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `attr category` for [core](/commands/categories/core.md)

<div class='command-title'>Attribute for adding a category to custom commands.</div>

## Signature

```> attr category {flags} (category)```

## Parameters

- `category`: Category of the custom command.


## Input/output types:

| input | output |
| ------- | ------------ |
| nothing | list\<string\> |

## Examples

Add a category to a custom command
```nu
> # Double numbers
@category math
def double []: [number -> number] { $in * 2 }

```
48 changes: 48 additions & 0 deletions commands/docs/attr_example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: attr example
categories: |
core
version: 0.103.0
core: |
Attribute for adding examples to custom commands.
usage: |
Attribute for adding examples to custom commands.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `attr example` for [core](/commands/categories/core.md)

<div class='command-title'>Attribute for adding examples to custom commands.</div>

## Signature

```> attr example {flags} (description) (example)```

## Flags

- `--result {any}`: Expected output of example.

## Parameters

- `description`: Description of the example.
- `example`: Example code snippet.


## Input/output types:

| input | output |
| ------- | -------------------------------------------- |
| nothing | record\<description: string, example: string\> |

## Examples

Add examples to custom command
```nu
> # Double numbers
@example "double an int" { 2 | double } --result 4
@example "double a float" { 0.25 | double } --result 0.5
def double []: [number -> number] { $in * 2 }

```
42 changes: 42 additions & 0 deletions commands/docs/attr_search-terms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: attr search-terms
categories: |
core
version: 0.103.0
core: |
Attribute for adding search terms to custom commands.
usage: |
Attribute for adding search terms to custom commands.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `attr search-terms` for [core](/commands/categories/core.md)

<div class='command-title'>Attribute for adding search terms to custom commands.</div>

## Signature

```> attr search-terms {flags} ...rest```

## Parameters

- `...rest`: Search terms.


## Input/output types:

| input | output |
| ------- | ------------ |
| nothing | list\<string\> |

## Examples

Add search terms to a custom command
```nu
> # Double numbers
@search-terms multiply times
def double []: [number -> number] { $in * 2 }

```
8 changes: 4 additions & 4 deletions commands/docs/banner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
title: banner
categories: |
default
version: 0.102.0
version: 0.103.0
default: |
Print a banner for nushell with information about the project
Print a banner for Nushell with information about the project
usage: |
Print a banner for nushell with information about the project
Print a banner for Nushell with information about the project
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `banner` for [default](/commands/categories/default.md)

<div class='command-title'>Print a banner for nushell with information about the project</div>
<div class='command-title'>Print a banner for Nushell with information about the project</div>

## Signature

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.102.0
version: 0.103.0
bits: |
Various commands for working with bits.
usage: |
Expand Down
4 changes: 2 additions & 2 deletions 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.102.0
version: 0.103.0
bits: |
Performs bitwise and for ints or binary values.
usage: |
Expand All @@ -26,7 +26,7 @@ contributors: false

## Parameters

- `target`: right-hand side of the operation
- `target`: Right-hand side of the operation.


## Input/output types:
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.102.0
version: 0.103.0
bits: |
Performs logical negation on each bit.
usage: |
Expand Down
4 changes: 2 additions & 2 deletions 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.102.0
version: 0.103.0
bits: |
Performs bitwise or for ints or binary values.
usage: |
Expand All @@ -26,7 +26,7 @@ contributors: false

## Parameters

- `target`: right-hand side of the operation
- `target`: Right-hand side of the operation.


## Input/output types:
Expand Down
4 changes: 2 additions & 2 deletions 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.102.0
version: 0.103.0
bits: |
Bitwise rotate left for ints or binary values.
usage: |
Expand All @@ -27,7 +27,7 @@ contributors: false

## Parameters

- `bits`: number of bits to rotate left
- `bits`: Number of bits to rotate left.


## Input/output types:
Expand Down
4 changes: 2 additions & 2 deletions 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.102.0
version: 0.103.0
bits: |
Bitwise rotate right for ints or binary values.
usage: |
Expand All @@ -27,7 +27,7 @@ contributors: false

## Parameters

- `bits`: number of bits to rotate right
- `bits`: Number of bits to rotate right.


## Input/output types:
Expand Down
Loading