Pick->Select rename. Integration tests changes. (#1725)

Pick->Select rename. Integration tests changes.
This commit is contained in:
Andrés N. Robalino
2020-05-07 06:03:43 -05:00
committed by GitHub
parent c3efdf2689
commit 96e5fc05a3
78 changed files with 380 additions and 411 deletions

View File

@ -29,7 +29,7 @@ Pass the output of the `open` command to `from vcf` to get a correctly formatted
```
```shell
> open contacts.txt | from vcf | get properties | where $it.name == "FN" | pick value
> open contacts.txt | from vcf | get properties | where $it.name == "FN" | select value
─────┬──────────────────────
# │ value
─────┼──────────────────────

View File

@ -18,13 +18,13 @@ Syntax: `save (path) {flags}`
You can save the name of files in a directory like this:
```shell
> ls | where type == File | pick name | save filenames.csv
> ls | where type == File | select name | save filenames.csv
```
Or you can format it in supported formats using one of the `to` commands:
```shell
> ls | where type == File | pick name | to csv | save filenames
> ls | where type == File | select name | to csv | save filenames
```
`filename.csv` and `filenames` are both `csv` formatted files. Nu auto-converts the format if a supported file extension is given.

View File

@ -1,4 +1,4 @@
# pick
# select
This command displays only the column names passed on to it.
@ -15,7 +15,7 @@ This command displays only the column names passed on to it.
3 │ abaracadabra.txt │ File │ │ 401 B │ a month ago │ a month ago │ a month ago
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a month ago │ a month ago │ a month ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
> ls | pick name
> ls | select name
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ name
───┼────────────────────────────
@ -30,7 +30,7 @@ This command displays only the column names passed on to it.
The order in which you put the column names matters:
```shell
> ls | pick type name size
> ls | select type name size
━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━
# │ type │ name │ size
───┼──────┼────────────────────────────┼────────
@ -40,7 +40,7 @@ The order in which you put the column names matters:
3 │ File │ abaracadabra.txt │ 401 B
4 │ File │ youshouldeatmorecereal.txt │ 768 B
━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━
> ls | pick size type name
> ls | select size type name
━━━┯━━━━━━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ size │ type │ name
───┼────────┼──────┼────────────────────────────

View File

@ -33,7 +33,7 @@ Syntax: `wrap <column>`
`wrap` will encapsulate rows as embedded tables :
```shell
/home/chris> ls | pick name type size
/home/chris> ls | select name type size
───┬──────────────┬──────┬─────────
# │ name │ type │ size
───┼──────────────┼──────┼─────────
@ -41,7 +41,7 @@ Syntax: `wrap <column>`
1 │ iso.csv │ File │ 20.8 KB
───┴──────────────┴──────┴─────────
/home/chris> ls | pick name type size | each {wrap details}
/home/chris> ls | select name type size | each {wrap details}
───┬────────────────
# │ details
───┼────────────────