on master help sign in
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

commit47283f226a828b0573f6a771d05139861f1c3e36 authorKuan-Yi Li <kyli@abysm.org> dateSun 12 Sep 2021, 20:01 (5 years ago) parentaefc8fd
1 file changed+1
.github/workflows/CICD.yml+1
.github/workflows/CICD.yml+1
@@ -348,6 +348,7 @@ jobs:
348348 gzip -n --best "${DPKG_DIR}/usr/share/man/man1/${{ env.PROJECT_NAME }}.1"
349349
350350 # Autocompletion files
351+ 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 }}"
351352 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"
352353 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 }}"
353354