mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Add example for enter, shells and view-source, update some docs (#4604)
This commit is contained in:
@ -13,3 +13,10 @@ Enters a new shell at the given path.
|
||||
## Parameters
|
||||
|
||||
- `path`: the path to enter as a new shell
|
||||
|
||||
## Examples
|
||||
|
||||
Enter a new shell at path '../dir-foo'
|
||||
```shell
|
||||
> enter ../dir-foo
|
||||
```
|
||||
|
@ -13,4 +13,3 @@ Get the git status of a repo
|
||||
## Parameters
|
||||
|
||||
- `path`: path to repo
|
||||
|
||||
|
@ -15,4 +15,3 @@ Increment a value or version. Optionally use the column of a table.
|
||||
- `--major`: increment the major version (eg 1.2.1 -> 2.0.0)
|
||||
- `--minor`: increment the minor version (eg 1.2.1 -> 1.3.0)
|
||||
- `--patch`: increment the patch version (eg 1.2.1 -> 1.2.2)
|
||||
|
||||
|
@ -9,4 +9,3 @@ Show all the query commands
|
||||
## Signature
|
||||
|
||||
```> query ```
|
||||
|
||||
|
@ -13,4 +13,3 @@ execute json query on json file (open --raw <file> | query json 'query string')
|
||||
## Parameters
|
||||
|
||||
- `query`: json query
|
||||
|
||||
|
@ -8,13 +8,12 @@ execute selector query on html/web
|
||||
|
||||
## Signature
|
||||
|
||||
```> query web --query --as_html --attribute --as_table --inspect```
|
||||
```> query web --query --as-html --attribute --as-table --inspect```
|
||||
|
||||
## Parameters
|
||||
|
||||
- `--query {string}`: selector query
|
||||
- `--as_html`: return the query output as html
|
||||
- `--as-html`: return the query output as html
|
||||
- `--attribute {string}`: downselect based on the given attribute
|
||||
- `--as_table {any}`: find table based on column header list
|
||||
- `--as-table {any}`: find table based on column header list
|
||||
- `--inspect`: run in inspect mode to provide more information for determining column headers
|
||||
|
||||
|
@ -13,4 +13,3 @@ execute xpath query on xml
|
||||
## Parameters
|
||||
|
||||
- `query`: xpath query
|
||||
|
||||
|
@ -9,3 +9,15 @@ Lists all open shells.
|
||||
## Signature
|
||||
|
||||
```> shells ```
|
||||
|
||||
## Examples
|
||||
|
||||
Enter a new shell at parent path '..' and show all opened shells
|
||||
```shell
|
||||
> enter ..; shells
|
||||
```
|
||||
|
||||
Show currently active shell
|
||||
```shell
|
||||
> shells | where active == $true
|
||||
```
|
||||
|
@ -13,3 +13,25 @@ View a block, module, or a definition
|
||||
## Parameters
|
||||
|
||||
- `item`: name or block to view
|
||||
|
||||
## Examples
|
||||
|
||||
View the source of a code block
|
||||
```shell
|
||||
> let abc = { echo 'hi' }; view-source $abc
|
||||
```
|
||||
|
||||
View the source of a custom command
|
||||
```shell
|
||||
> def hi [] { echo 'Hi!' }; view-source hi
|
||||
```
|
||||
|
||||
View the source of a custom command, which participates in the caller environment
|
||||
```shell
|
||||
> def-env foo [] { let-env BAR = 'BAZ' }; view-source foo
|
||||
```
|
||||
|
||||
View the source of a module
|
||||
```shell
|
||||
> module mod-foo { export env FOO_ENV { 'BAZ' } }; view-source mod-foo
|
||||
```
|
||||
|
Reference in New Issue
Block a user