nushell/crates/nu-command
Andrés N. Robalino b873fa7a5f
The zip command. (#3919)
We introduce it here and allow it to work with regular lists (tables with no columns) as well as symmetric tables. Say we have two lists and wish to zip them, like so:

```
[0 2 4 6 8] | zip {
  [1 3 5 7 9]
} | flatten

───┬───
 0 │ 0
 1 │ 1
 2 │ 2
 3 │ 3
 4 │ 4
 5 │ 5
 6 │ 6
 7 │ 7
 8 │ 8
 9 │ 9
───┴───
```

In the case for two tables instead:

```
[[symbol]; ['('] ['['] ['{']] | zip {
  [[symbol]; [')'] [']'] ['}']]
} | each {
  get symbol | $'($in.0)nushell($in.1)'
}

───┬───────────
 0 │ (nushell)
 1 │ [nushell]
 2 │ {nushell}
───┴───────────
```
2021-08-14 23:36:08 -05:00
..
assets nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
src The zip command. (#3919) 2021-08-14 23:36:08 -05:00
tests The zip command. (#3919) 2021-08-14 23:36:08 -05:00
build.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
Cargo.toml Use bigdecimal-rs patch (#3905) 2021-08-07 09:27:19 +12:00
README.md Begin directory contrib docs and split commands (#3650) 2021-06-19 12:06:44 +12:00

nu-command

The Nu command crate contains the full set of internal commands, that is, the commands that can be form the set of built-in commands in a Nushell engine.

The default set of commands that Nushell ships with can be found in the default context.

The commands themselves live in the commands module.