reverse for filters
Reverses the input list or table.
Signature
> reverse {flags}
Input/output types:
| input | output |
|---|---|
| list<any> | list<any> |
Examples
Reverse a list.
> [0,1,2,3] | reverse ╭───┬───╮ │ 0 │ 3 │ │ 1 │ 2 │ │ 2 │ 1 │ │ 3 │ 0 │ ╰───┴───╯
Reverse a table.
> [{a: 1} {a: 2}] | reverse
╭───┬───╮
│ # │ a │
├───┼───┤
│ 0 │ 2 │
│ 1 │ 1 │
╰───┴───╯
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/reverse.html