mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Move 'nth' into 'select' (#4385)
This commit is contained in:
@ -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
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user