From 21772978718a71e9d216cdcae2431bf08853a843 Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Thu, 20 Jan 2022 09:10:18 +0100 Subject: [PATCH] Move shell completion scripts to their own directory (#259) * Move shell completion scripts to their own directory * Remove completion scripts from published Cargo package --- .github/workflows/release.yml | 2 +- Cargo.toml | 2 +- bash_tealdeer => completion/bash_tealdeer | 0 fish_tealdeer => completion/fish_tealdeer | 0 zsh_tealdeer => completion/zsh_tealdeer | 0 docs/src/installing.md | 9 ++++++--- 6 files changed, 8 insertions(+), 5 deletions(-) rename bash_tealdeer => completion/bash_tealdeer (100%) rename fish_tealdeer => completion/fish_tealdeer (100%) rename zsh_tealdeer => completion/zsh_tealdeer (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0a7f1c2..eb0c0cf6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: run: | source ./scripts/upload-asset.sh # Upload: - 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: diff --git a/Cargo.toml b/Cargo.toml index 82d7cc16..6752a3bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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]] diff --git a/bash_tealdeer b/completion/bash_tealdeer similarity index 100% rename from bash_tealdeer rename to completion/bash_tealdeer diff --git a/fish_tealdeer b/completion/fish_tealdeer similarity index 100% rename from fish_tealdeer rename to completion/fish_tealdeer diff --git a/zsh_tealdeer b/completion/zsh_tealdeer similarity index 100% rename from zsh_tealdeer rename to completion/zsh_tealdeer diff --git a/docs/src/installing.md b/docs/src/installing.md index ed16a33a..9ad35e2a 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -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`