diff options
author | zeripath | 2023-02-21 17:32:24 +0000 |
---|---|---|
committer | GitHub | 2023-02-21 12:32:24 -0500 |
commit | 43405c35f07d8f6fb7c177cf599e19090020527e (patch) | |
tree | ccf1758bd4098b523282585f5e8b26365b9fa027 /main.go | |
parent | 4de5cd9f367fe73815b1c72ffc54a5118cc8e1d6 (diff) |
Add Bash and Zsh completion scripts (#22646)
This PR adds contrib scripts for bash and zsh completion.
Simply call:
```bash
source contrib/autocompletion/bash_autocomplete
```
or for Zsh:
```bash
source contrib/autocompletion/zsh_autocomplete
```
Signed-off-by: Andrew Thornton <art27@cantab.net>
---------
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -113,6 +113,8 @@ arguments - which can alternatively be run by running the subcommand web.` setFlagsAndBeforeOnSubcommands(&app.Commands[i], defaultFlags, establishCustomPath) } + app.EnableBashCompletion = true + err := app.Run(os.Args) if err != nil { log.Fatal("Failed to run app with %s: %v", os.Args, err) |