mirror of
https://github.com/nushell/nushell.git
synced 2024-12-24 07:59:21 +01:00
add documentation for save, config
This commit is contained in:
parent
6a6589a357
commit
36938a4407
@ -6,7 +6,6 @@ Syntax: `config {flags}`
|
||||
|
||||
### Flags
|
||||
|
||||
|
||||
--load <file path shape>
|
||||
load the config from the path give
|
||||
|
||||
@ -31,7 +30,7 @@ Syntax: `config {flags}`
|
||||
### 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 |
|
||||
|
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 New Issue
Block a user