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 /docs | |
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 'docs')
-rw-r--r-- | docs/content/doc/installation/from-binary.en-us.md | 10 | ||||
-rw-r--r-- | docs/content/doc/installation/from-source.en-us.md | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index 669180e38..6f71b0b91 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -129,6 +129,16 @@ export GITEA_WORK_DIR=/var/lib/gitea/ cp gitea /usr/local/bin/gitea ``` +### Adding bash/zsh autocompletion (from 1.19) + +A script to enable bash-completion can be found at [`contrib/autocompletion/bash_autocomplete`](https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/autocompletion/bash_autocomplete). This can be copied to `/usr/share/bash-completion/completions/gitea` +or sourced within your `.bashrc`. + +Similarly a script for zsh-completion can be found at [`contrib/autocompletion/zsh_autocomplete`](https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/autocompletion/zsh_autocomplete). This can be copied to `/usr/share/zsh/_gitea` or sourced within your +`.zshrc`. + +YMMV and these scripts may need further improvement. + ## Running Gitea After you complete the above steps, you can run Gitea two ways: diff --git a/docs/content/doc/installation/from-source.en-us.md b/docs/content/doc/installation/from-source.en-us.md index 4394d1920..ae3ddc5c4 100644 --- a/docs/content/doc/installation/from-source.en-us.md +++ b/docs/content/doc/installation/from-source.en-us.md @@ -193,3 +193,13 @@ LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="netgo osusergo ``` This can be combined with `CC`, `GOOS`, and `GOARCH` as above. + +### Adding bash/zsh autocompletion (from 1.19) + +A script to enable bash-completion can be found at [`contrib/autocompletion/bash_autocomplete`](https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/autocompletion/bash_autocomplete). This should be altered as appropriate and can be `source` in your `.bashrc` +or copied as `/usr/share/bash-completion/completions/gitea`. + +Similary a script for zsh-completion can be found at [`contrib/autocompletion/zsh_autocomplete`](https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/autocompletion/zsh_autocomplete). This can be copied to `/usr/share/zsh/_gitea` or sourced within your +`.zshrc`. + +YMMV and these scripts may need further improvement. |