Add bash completion for gaiad and gaiacli (#3334)
This commit is contained in:
committed by
Jack Zampolin
parent
7f789d2ed3
commit
cffa39cf44
@@ -761,3 +761,36 @@ The transaction can now be sent to the node:
|
||||
```bash
|
||||
gaiacli tx broadcast signedTx.json
|
||||
```
|
||||
|
||||
## Shells completion scripts
|
||||
|
||||
Completion scripts for popular UNIX shell interpreters such as `Bash` and `Zsh`
|
||||
can be generated through the `completion` command, which is available for both
|
||||
`gaiad` and `gaiacli`.
|
||||
|
||||
If you want to generate `Bash` completion scripts run the following command:
|
||||
|
||||
```bash
|
||||
gaiad completion > gaiad_completion
|
||||
gaiacli completion > gaiacli_completion
|
||||
```
|
||||
|
||||
If you want to generate `Zsh` completion scripts run the following command:
|
||||
|
||||
```bash
|
||||
gaiad completion --zsh > gaiad_completion
|
||||
gaiacli completion --zsh > gaiacli_completion
|
||||
```
|
||||
|
||||
::: tip Note
|
||||
On most UNIX systems, such scripts may be loaded in `.bashrc` or
|
||||
`.bash_profile` to enable Bash autocompletion:
|
||||
|
||||
```bash
|
||||
echo '. gaiad_completion' >> ~/.bashrc
|
||||
echo '. gaiacli_completion' >> ~/.bashrc
|
||||
```
|
||||
|
||||
Refer to the user's manual of your interpreter provided by your
|
||||
operating system for information on how to enable shell autocompletion.
|
||||
:::
|
||||
|
||||
Reference in New Issue
Block a user