Move shell completion scripts to their own directory (#259)

* Move shell completion scripts to their own directory
* Remove completion scripts from published Cargo package
This commit is contained in:
Danny Moesch 2022-01-20 09:10:18 +01:00 committed by GitHub
commit 2177297871
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 5 deletions

View file

@ -29,7 +29,7 @@ jobs:
run: |
source ./scripts/upload-asset.sh
# Upload: <token> <repo> <tag> <file> <name>
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} ${{ matrix.target }}_tealdeer completions_${{ matrix.target }}
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} completion/${{ matrix.target }}_tealdeer completions_${{ matrix.target }}
upload-license:
needs:

View file

@ -11,7 +11,7 @@ readme = "README.md"
repository = "https://github.com/dbrgn/tealdeer/"
documentation = "https://dbrgn.github.io/tealdeer/"
version = "1.5.0"
include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"]
include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png"]
edition = "2018"
[[bin]]

View file

@ -57,6 +57,9 @@ To enable the log output, set the `RUST_LOG` env variable:
## Autocompletion
- *Bash*: copy `bash_tealdeer` to `/usr/share/bash-completion/completions/tldr`
- *Fish*: copy `fish_tealdeer` to `~/.config/fish/completions/tldr.fish`
- *Zsh*: copy `zsh_tealdeer` to `/usr/share/zsh/site-functions/_tldr`
Shell completion scripts are located in the folder `completion`.
Just copy them to their designated location:
- *Bash*: `cp completion/bash_tealdeer /usr/share/bash-completion/completions/tldr`
- *Fish*: `cp completion/fish_tealdeer ~/.config/fish/completions/tldr.fish`
- *Zsh*: `cp completion/zsh_tealdeer /usr/share/zsh/site-functions/_tldr`