mirror of
https://github.com/nushell/nushell.git
synced 2025-04-16 17:28:19 +02:00
docs: add alias --save flag (#1874)
This commit is contained in:
parent
9c14fb6c02
commit
fb09d7d1a1
@ -1,11 +1,17 @@
|
|||||||
# alias
|
# alias
|
||||||
This command allows you to define shortcuts for other common commands.
|
This command allows you to define shortcuts for other common commands. By default, they only apply to the current session. To persist them, add `--save`.
|
||||||
|
|
||||||
|
Syntax: `alias {flags} <name> [<parameters>] {<body>}`
|
||||||
|
|
||||||
The command expects three parameters:
|
The command expects three parameters:
|
||||||
* the name of alias
|
* the name of alias
|
||||||
* the parameters as a space-separated list (`[a b ...]`), can be empty (`[]`)
|
* the parameters as a space-separated list (`[a b ...]`), can be empty (`[]`)
|
||||||
* the body of the alias as a `{...}` block
|
* the body of the alias as a `{...}` block
|
||||||
|
|
||||||
|
## Flags
|
||||||
|
|
||||||
|
* `-s`, `--save`: Save the alias to your config (see `config --path` to edit them later)
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
Define a custom `myecho` command as an alias:
|
Define a custom `myecho` command as an alias:
|
||||||
|
Loading…
Reference in New Issue
Block a user