Install shell completions with cmake #34714

issue kpcyrd openend this issue on March 2, 2026
  1. kpcyrd commented at 6:05 pm on March 2, 2026: none

    Please describe the feature you’d like to see added.

    When building a package, I currently have the following code to include shell completions for the relevant components:

     0for tool in bitcoin bitcoin-tx bitcoin-util bitcoin-wallet bitcoin-chainstate libbitcoinkernel
     1do
     2  DESTDIR="$pkgdir" cmake --install build --component "$tool"
     3
     4  # shell completions
     5  if [ -f "contrib/completions/bash/$tool.bash" ]; then
     6    install -Dm644 "contrib/completions/bash/$tool.bash" \
     7      "$pkgdir/usr/share/bash-completion/completions/$tool"
     8  fi
     9  if [ -f "contrib/completions/fish/$tool.fish" ]; then
    10    install -Dm644 contrib/completions/fish/$tool.fish \
    11      -t "$pkgdir/usr/share/fish/vendor_completions.d/"
    12  fi
    13done
    

    No response

    Describe the solution you’d like

    I’m wondering if there could be a way to include the shell completions in cmake --install, so running DESTDIR="$pkgdir" cmake --install build --component bitcoin-tx would copy shell completions to DESTDIR, if any are available.

    Describe any alternatives you’ve considered

    Keeping the current code as-is. :)

    Please leave any additional context

    No response

  2. kpcyrd added the label Feature on Mar 2, 2026


kpcyrd

Labels
Feature


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-03 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me