mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
add documentation for save, config
This commit is contained in:
parent
c77059f891
commit
fbb65cde44
3 changed files with 72 additions and 1 deletions
43
docs/commands/config.md
Normal file
43
docs/commands/config.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
# config
|
||||
|
||||
Configuration management.
|
||||
|
||||
Syntax: `config {flags}`
|
||||
|
||||
### Flags
|
||||
|
||||
|
||||
--load <file path shape>
|
||||
load the config from the path give
|
||||
|
||||
--set <any shape>
|
||||
set a value in the config, eg) --set [key value]
|
||||
|
||||
--set_into <member shape>
|
||||
sets a variable from values in the pipeline
|
||||
|
||||
--get <any shape>
|
||||
get a value from the config
|
||||
|
||||
--remove <any shape>
|
||||
remove a value from the config
|
||||
|
||||
--clear
|
||||
clear the config
|
||||
|
||||
--path
|
||||
return the path to the config file
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Type | Description |
|
||||
| ------------- | ------------- | ----- |
|
||||
| path | table of strings | PATH to use to find binaries |
|
||||
| env | row | the environment variables to pass to external commands |
|
||||
| ctrlc_exit | boolean | whether or not to exit Nu after multiple ctrl-c presses |
|
||||
| table_mode | "light" or other | enable lightweight or normal tables |
|
||||
| edit_mode | "vi" or "emacs" | changes line editing to "vi" or "emacs" mode |
|
||||
|
||||
## Examples
|
||||
|
||||
A more detailed description on how to use this command to configure Nu shell can be found in the configuration chapter of [Nu Book](https://book.nushell.sh/).
|
|
@ -1,6 +1,6 @@
|
|||
# from-yaml
|
||||
|
||||
Parse text as `.yaml/.yml` and create table.
|
||||
Parse text as `.yaml/.yml` and create table. Use this when nushell cannot dertermine the input file extension.
|
||||
|
||||
Syntax: `from-yaml`
|
||||
|
||||
|
|
28
docs/commands/save.md
Normal file
28
docs/commands/save.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# save
|
||||
|
||||
This command saves the contents of the pipeline to a file. Use this in combination with the `to-json`, `to-csv`, ... commands to save the contents in the specified format.
|
||||
|
||||
Syntax: `save (path) {flags}`
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `(path)` the path to save contents to
|
||||
|
||||
### Flags
|
||||
|
||||
--raw
|
||||
treat values as-is rather than auto-converting based on file extension
|
||||
|
||||
## Example
|
||||
|
||||
You can save the name of files in a directory like this:
|
||||
|
||||
```shell
|
||||
> ls | where type == File | pick name | save
|
||||
```
|
||||
|
||||
Or you can format it in supported formats using one of the `to-*` commands:
|
||||
|
||||
```shell
|
||||
> ls | where type == File | pick name | to-csv | save
|
||||
```
|
Loading…
Reference in a new issue