Move 'nth' into 'select' (#4385)

This commit is contained in:
JT
2022-02-09 09:59:40 -05:00
committed by GitHub
parent 43850bf20e
commit 5a1d81221f
18 changed files with 190 additions and 259 deletions

View File

@ -26,7 +26,7 @@ Basic usage:
One useful application is piping the contents of file into `lines`. This example extracts a certain line from a given file.
```shell
> cat lines.md | lines | nth 6
> cat lines.md | lines | select 6
## Examples
```

View File

@ -1,12 +1,12 @@
# nth
This command returns the nth row of a table, starting from 0.
This command returns the select row of a table, starting from 0.
If the number given is less than 0 or more than the number of rows, nothing is returned.
## Usage
```shell
> [input-command] | nth <row number> ...args
> [input-command] | select <row number> ...args
```
## Parameters
@ -45,7 +45,7 @@ If the number given is less than 0 or more than the number of rows, nothing is r
```
```shell
> ls | nth 0
> ls | select 0
──────────┬────────────────────
name │ CODE_OF_CONDUCT.md
type │ File
@ -55,7 +55,7 @@ If the number given is less than 0 or more than the number of rows, nothing is r
```
```shell
> ls | nth 0 2
> ls | select 0 2
───┬────────────────────┬──────┬──────────┬─────────────
# │ name │ type │ size │ modified
───┼────────────────────┼──────┼──────────┼─────────────
@ -65,7 +65,7 @@ If the number given is less than 0 or more than the number of rows, nothing is r
```
```shell
> ls | nth 5
> ls | select 5
──────────┬───────────────
name │ Makefile.toml
type │ File