Add def documentation (#2939)

This commit is contained in:
Leonhard Kipp 2021-01-15 08:21:18 +01:00 committed by GitHub
parent c5485c6501
commit f9b0b81eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

17
docs/commands/def.md Normal file
View File

@ -0,0 +1,17 @@
# def
Use `def` to create a custom command.
## Examples
```
> def my_command [] { echo hi nu }
> my_command
hi nu
```
```
> def my_command [adjective: string, num: int] { echo $adjective $num meet nu }
> my_command nice 2
nice 2 meet nu
```