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
..
2021-07-29 10:22:16 -05:00
2021-01-12 17:59:53 +13:00
2021-06-23 15:44:14 +12:00
2021-01-12 17:59:53 +13:00
2021-06-20 11:07:26 +12:00
2021-07-30 08:11:47 +12:00
2021-03-14 10:46:40 +13:00
2021-01-12 17:59:53 +13:00
2021-05-27 12:18:02 -05:00
2021-07-30 09:12:24 +12:00
2021-06-18 07:59:58 +12:00
2021-06-18 07:59:58 +12:00
2021-03-14 10:46:40 +13:00
2021-06-19 11:29:29 +12:00
2021-03-14 10:46:40 +13:00
2021-06-18 13:04:51 +12:00
2021-01-12 17:59:53 +13:00
2021-01-12 17:59:53 +13:00
2021-03-14 10:46:40 +13:00
2021-03-14 10:46:40 +13:00
2021-05-12 13:01:48 +12:00
2021-01-13 08:27:54 +13:00
2021-06-09 18:07:54 +12:00
2021-01-12 17:59:53 +13:00
2021-01-12 17:59:53 +13:00
2021-03-14 10:46:40 +13:00
2021-05-12 13:01:48 +12:00
2021-02-03 07:19:38 -06:00
2021-03-26 21:26:57 +13:00
2021-03-14 10:46:40 +13:00
2021-01-12 17:59:53 +13:00
2021-03-14 10:46:40 +13:00
2021-01-12 17:59:53 +13:00
2021-06-07 20:08:35 +12:00
2021-05-12 13:01:48 +12:00
2021-03-14 10:46:40 +13:00
2021-03-14 10:46:40 +13:00
2021-03-14 10:46:40 +13:00
2021-03-31 19:52:39 +13:00
2021-01-12 17:59:53 +13:00
2021-03-14 10:46:40 +13:00
2021-08-14 23:36:08 -05:00
2021-03-14 10:46:40 +13:00
2021-03-14 15:13:31 +13:00
2021-05-22 10:52:04 -05:00
2021-01-12 17:59:53 +13:00
2021-05-17 15:08:47 +12:00
2021-05-27 12:18:02 -05:00
2021-03-26 21:26:57 +13:00
2021-01-12 17:59:53 +13:00
2021-05-30 15:36:36 +12:00
2021-05-12 13:01:48 +12:00
2021-02-22 06:56:34 -05:00
2021-01-12 17:59:53 +13:00
2021-03-14 10:46:40 +13:00
2021-01-12 17:59:53 +13:00
2021-01-12 17:59:53 +13:00
2021-03-14 10:46:40 +13:00
2021-01-12 17:59:53 +13:00
2021-03-14 10:46:40 +13:00
2021-01-12 17:59:53 +13:00
2021-07-10 07:27:35 +12:00
2021-06-07 20:08:35 +12:00
2021-03-14 10:46:40 +13:00
2021-03-14 10:46:40 +13:00
2021-01-12 17:59:53 +13:00
2021-01-12 17:59:53 +13:00
2021-08-14 23:36:08 -05:00