mirror of
https://github.com/nushell/nushell
synced 2025-01-13 05:38:57 +00:00
add documentation file for first command
This commit is contained in:
parent
149961e8f1
commit
9d84e47214
1 changed files with 28 additions and 0 deletions
28
docs/commands/first.md
Normal file
28
docs/commands/first.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# first
|
||||
|
||||
Use `first` to retrieve the first "n" rows of a table. `first` has a required amount parameter that indicates how many rows you would like returned. If more than one row is returned, an index column will be included showing the row number.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
> ps | first 1
|
||||
━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
|
||||
pid │ name │ status │ cpu
|
||||
───────┼──────────────┼─────────┼───────────────────
|
||||
60358 │ nu_plugin_ps │ Running │ 5.399802999999999
|
||||
━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
> ps | first 5
|
||||
━━━┯━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
|
||||
# │ pid │ name │ status │ cpu
|
||||
───┼───────┼──────────────┼─────────┼───────────────────
|
||||
0 │ 60754 │ nu_plugin_ps │ Running │ 4.024156000000000
|
||||
1 │ 60107 │ quicklookd │ Running │ 0.000000000000000
|
||||
2 │ 59356 │ nu │ Running │ 0.000000000000000
|
||||
3 │ 59216 │ zsh │ Running │ 0.000000000000000
|
||||
4 │ 59162 │ vim │ Running │ 0.000000000000000
|
||||
━━━┷━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
Loading…
Reference in a new issue