mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 05:08:01 +02:00
Auto-generate markdown command docs (#4451)
* Finish updating * a couple improvements * Update renames * cleanup examples
This commit is contained in:
@ -1,32 +1,17 @@
|
||||
# alias
|
||||
---
|
||||
title: alias
|
||||
layout: command
|
||||
version: 0.59.0
|
||||
---
|
||||
|
||||
This command allows you to define shortcuts for other common commands. By default, they only apply to the current session. To persist them, add them to your config.
|
||||
Alias a command (with optional flags) to a new name
|
||||
|
||||
Syntax: `alias <name> = <body>`
|
||||
## Signature
|
||||
|
||||
The command expects two parameters:
|
||||
```> alias (name) (initial_value)```
|
||||
|
||||
* The name of the alias
|
||||
* The body of the alias
|
||||
## Parameters
|
||||
|
||||
## Examples
|
||||
- `name`: name of the alias
|
||||
- `initial_value`: equals sign followed by value
|
||||
|
||||
Define a custom `myecho` command as an alias:
|
||||
|
||||
```shell
|
||||
> alias myecho = echo
|
||||
> myecho "hello world"
|
||||
hello world
|
||||
```
|
||||
|
||||
The suggested help command works!
|
||||
|
||||
```shell
|
||||
> myecho -h
|
||||
|
||||
Usage:
|
||||
> myecho {flags}
|
||||
|
||||
flags:
|
||||
-h, --help: Display this help message
|
||||
```
|
||||
|
Reference in New Issue
Block a user