mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 08:28:37 +02:00
First pass at updating all documentation formatting and cleaning up output of examples (#2031)
This commit is contained in:
@ -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
|
||||
────┼──────────────┼────────────────────────────────────────────────────────────────────────────────────────
|
||||
0 │ add │ Add a new field to the table.
|
||||
1 │ autoview │ View the contents of the pipeline as a table or list.
|
||||
2 │ cd │ Change to a new path.
|
||||
3 │ config │ Configuration management.
|
||||
4 │ cp │ Copy files.
|
||||
5 │ date │ Get the current datetime.
|
||||
────┼──────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
0 │ alias │ Define 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 │ cal │ Display a calendar.
|
||||
5 │ calc │ Parse a math expression into a number
|
||||
...
|
||||
70 │ trim │ Trim leading and following whitespace from text data.
|
||||
71 │ version │ Display Nu version
|
||||
72 │ where │ Filter table to match the condition.
|
||||
73 │ which │ Finds a program file.
|
||||
━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
83 │ where │ Filter table to match the condition.
|
||||
84 │ which │ 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 -
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user