Auto-generate markdown command docs (#4451)

* Finish updating

* a couple improvements

* Update renames

* cleanup examples
This commit is contained in:
JT
2022-02-13 21:22:51 -05:00
committed by GitHub
parent 06f5affc0b
commit 8c0a2d3c15
478 changed files with 7676 additions and 8045 deletions

View File

@ -1,31 +1,28 @@
# first
---
title: first
layout: command
version: 0.59.0
---
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.
Show only the first number of rows.
## Signature
```> first (rows)```
## Parameters
- `rows`: starting from the front, the number of rows to return
## Examples
Return the first item of a list/table
```shell
> ps | first 1
─────────┬──────────────────
pid │ 14733
name │ nu_plugin_core_p
status │ Running
cpu │ 4.1229
mem │ 2.1 MB
virtual │ 4.8 GB
─────────┴──────────────────
> [1 2 3] | first
```
Return the first 2 items of a list/table
```shell
> ps | first 5
───┬───────┬──────────────────┬─────────┬──────────┬─────────┬─────────
# │ pid │ name │ status │ cpu │ mem │ virtual
───┼───────┼──────────────────┼─────────┼──────────┼─────────┼─────────
014747 │ nu_plugin_core_p │ Running │ 3.5653 │ 2.1 MB │ 4.8 GB
114735 │ Python │ Running │ 100.0008 │ 27.4 MB │ 5.4 GB
214734 │ mdworker_shared │ Running │ 0.0000 │ 18.4 MB │ 4.7 GB
314729 │ mdworker_shared │ Running │ 0.0000 │ 8.2 MB │ 5.0 GB
414728 │ mdworker_shared │ Running │ 0.0000 │ 8.0 MB │ 4.9 GB
───┴───────┴──────────────────┴─────────┴──────────┴─────────┴─────────
> [1 2 3] | first 2
```