roll right
for filters> roll right {flags}
--by, -b {int}
: Number of columns to roll--cells-only, -c
: rotates columns leaving headers fixedinput | output |
---|---|
record | record |
table | table |
Rolls columns of a record to the right
> {a:1b:2c:3} |roll right
╭───┬───╮
│c│3│
│a│1│
│b│2│
╰───┴───╯
Rolls columns to the right
> [[abc]; [123] [456]] |roll right
╭───┬───┬───┬───╮
│# │ c │ a │ b │
├───┼───┼───┼───┤
│0│3│1│2│
│1│6│4│5│
╰───┴───┴───┴───╯
Rolls columns to the right with fixed headers
> [[abc]; [123] [456]] |roll right--cells-only
╭───┬───┬───┬───╮
│# │ a │ b │ c │
├───┼───┼───┼───┤
│0│3│1│2│
│1│6│4│5│
╰───┴───┴───┴───╯
Tips: Command roll right
was not included in the official binaries by default, you have to build it with --features=extra
flag
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/roll_right.html