First pass at updating all documentation formatting and cleaning up output of examples (#2031)

This commit is contained in:
Joseph T. Lyons
2020-06-23 14:21:47 -04:00
committed by GitHub
parent d095cb91e4
commit 053bd926ec
81 changed files with 1069 additions and 679 deletions

View File

@ -14,26 +14,40 @@ Here are some tips to help you get started.
* help commands - list all available commands
* help <command name> - display help about a particular command
Nushell works on the idea of a "pipeline". Pipelines are commands connected with the '|' character.
Each stage in the pipeline works together to load, parse, and display information to you.
[Examples]
List the files in the current directory, sorted by size:
ls | sort-by size
Get information about the current system:
sys | get host
Get the processes on your system actively using CPU:
ps | where cpu > 0
You can also learn more at https://www.nushell.sh/book/
```
```shell
> help commands
━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
────┬──────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
# │ name │ description
────┼──────────────┼────────────────────────────────────────────────────────────────────────────────────────
0add Add a new field to the table.
1 │ autoview │ View the contents of the pipeline as a table or list.
2cd │ Change to a new path.
3config │ Configuration management.
4 │ cp Copy files.
5dateGet the current datetime.
────┼──────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
0 aliasDefine a shortcut for another command.
1 │ append │ Append the given row to the table
2 autoview │ View the contents of the pipeline as a table or list.
3 build-string │ Builds a string from the arguments
4 │ calDisplay a calendar.
5 calcParse a math expression into a number
...
70trim Trim leading and following whitespace from text data.
71versionDisplay Nu version
72 │ where │ Filter table to match the condition.
73 │ whichFinds a program file.
━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83whereFilter table to match the condition.
84which Finds a program file.
85 │ with-env │ Runs a block with an environment set. Eg) with-env [NAME 'foo'] { echo $nu.env.NAME }
86 │ wrap Wraps the given data in a table.
────┴──────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
```
```shell
@ -41,7 +55,24 @@ You can also learn more at https://www.nushell.sh/book/
Change to a new path.
Usage:
> cd (directory)
> cd (directory) {flags}
Parameters:
(directory) the directory to change to
Flags:
-h, --help: Display this help message
Examples:
Change to a new directory called 'dirname'
> cd dirname
Change to your home directory
> cd
Change to your home directory (alternate version)
> cd ~
Change to the previous directory
> cd -
```