docs: add alias --save flag (#1874)

This commit is contained in:
Jörn Zaefferer 2020-05-24 19:42:20 +02:00 committed by GitHub
parent 9c14fb6c02
commit fb09d7d1a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,17 @@
# 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 name of alias
* the parameters as a space-separated list (`[a b ...]`), can be empty (`[]`)
* 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
Define a custom `myecho` command as an alias: