From 47283f226a828b0573f6a771d05139861f1c3e36 Mon Sep 17 00:00:00 2001 From: Kuan-Yi Li Date: Sun, 12 Sep 2021 20:01:09 +0800 Subject: [PATCH] Add bash completion to deb package From the discussion in #1734, instead of using `env.PROJECT_NAME`, `steps.strip.outputs.BIN_NAME` could potentially be a better choice as the filename needs to match the called executable for bash-completion's on demand loading to work. This `BIN_NAME` needs to stay in sync with `env.PROJECT_EXECUTABLE` which is replaced in the template, but not available for the deb build at this stage. Follow the same route as for the fish/zsh completions for now for the sake of consistency. Closes #1733 --- .github/workflows/CICD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 24eff6c2..10ff2690 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -348,6 +348,7 @@ jobs: gzip -n --best "${DPKG_DIR}/usr/share/man/man1/${{ env.PROJECT_NAME }}.1" # Autocompletion files + install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "${DPKG_DIR}/usr/share/bash-completion/completions/${{ env.PROJECT_NAME }}" install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "${DPKG_DIR}/usr/share/fish/vendor_completions.d/${{ env.PROJECT_NAME }}.fish" install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.zsh "${DPKG_DIR}/usr/share/zsh/vendor-completions/_${{ env.PROJECT_NAME }}"