contrib: zsh and fish completions for bitcoin wrapper executable #33747

pull hulxv wants to merge 1 commits into bitcoin:master from hulxv:feat/bitcoin-shell-completions changing 3 files +891 −1
  1. hulxv commented at 6:09 PM on October 30, 2025: none

    <!-- *** Please remove the following help text before submitting: *** Pull requests without a rationale and clear improvement may be closed immediately. GUI-related pull requests should be opened against https://github.com/bitcoin-core/gui first. See CONTRIBUTING.md -->

    <!-- Please provide clear motivation for your patch and explain how it improves Bitcoin Core user experience or Bitcoin Core developer experience significantly: * Any test improvements or new tests that improve coverage are always welcome. * All other changes should have accompanying unit tests (see `src/test/`) or functional tests (see `test/`). Contributors should note which tests cover modified code. If no tests exist for a region of modified code, new tests should accompany the change. * Bug fixes are most welcome when they come with steps to reproduce or an explanation of the potential issue as well as reasoning for the way the bug was fixed. * Features are welcome, but might be rejected due to design or scope issues. If a feature is based on a lot of dependencies, contributors should first consider building the system outside of Bitcoin Core, if possible. * Refactoring changes are only accepted if they are required for a feature or bug fix or otherwise improve developer experience significantly. For example, most "code style" refactoring changes require a thorough explanation why they are useful, what downsides they have and why they *significantly* improve developer experience or avoid serious programming bugs. Note that code style is often a subjective matter. Unless they are explicitly mentioned to be preferred in the [developer notes](/doc/developer-notes.md), stylistic code changes are usually rejected. -->

    <!-- Bitcoin Core has a thorough review process and even the most trivial change needs to pass a lot of eyes and requires non-zero or even substantial time effort to review. There is a huge lack of active reviewers on the project, so patches often sit for a long time. -->

    Add shell (bash, fish, and zsh) completions for unified bitcoin CLI

    This PR adds comprehensive shell completion scripts for the new unified bitcoin command-line interface introduced in #31375. The completions support bash, zsh, and fish shells and provide tab completion for all available commands, options, and arguments.

    Example Usage

    # Complete subcommands
    bitcoin <TAB>
    # gui  node  rpc  wallet  tx  help  bench  chainstate  test  test-gui
    
    # Complete RPC methods  
    bitcoin rpc <TAB>
    # getblockchaininfo  getbestblockhash  getblock  ...
    
    # Complete options
    bitcoin node -<TAB>
    # -datadir  -conf  -daemon  -help  -rpcport  ...
    

    Close #33603

  2. DrahtBot commented at 6:09 PM on October 30, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33747.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #34906 (contrib: Add zsh completion scripts by bittoby)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. fanquake commented at 5:21 PM on November 3, 2025: member

    Thanks. However aside from the fish addition, this duplicates works already being done in #33385 and #33402.

  4. hulxv commented at 5:45 PM on November 3, 2025: none

    Thanks. However aside from the fish addition, this duplicates works already being done in #33385 and #33402.

    Actually, bash is the only is implemented in #33385 but zsh isn't implemented in #33402

    Also in #33385, he covers only rpc, node, and tx, but mine covers all subcommands

  5. hulxv renamed this:
    feat: shell completions for bitcoin wrapper executable
    contrib: shell completions for bitcoin wrapper executable
    on Nov 3, 2025
  6. DrahtBot added the label Scripts and tools on Nov 3, 2025
  7. caesrcd commented at 8:30 PM on November 3, 2025: contributor

    The bash completion in #33385 is being created in the same way the bitcoin command was — as a wrapper. For that reason, since bash completions currently exist only for bitcoin-cli, bitcoind, and bitcoin-tx, it only covers rpc, node, and tx.

    I think it’s unnecessary to duplicate existing bash completions. Once #33385 gets merged, we can just add completions for the commands that don’t have them yet.

  8. hulxv force-pushed on Mar 11, 2026
  9. contrib: zsh and fish completions for bitcoin wrapper executable 300cdf843c
  10. hulxv force-pushed on Mar 12, 2026
  11. hulxv renamed this:
    contrib: shell completions for bitcoin wrapper executable
    contrib: zsh and fish completions for bitcoin wrapper executable
    on Mar 12, 2026
  12. hulxv commented at 2:19 AM on March 12, 2026: none

    Thanks. However aside from the fish addition, this duplicates works already being done in #33385 and #33402.

    Hey @fanquake, I return to work on this again. It shouldn't duplicate anything from other PRs now. Removed the bash completions that existed in #33385 and #33402, which didn't contain bitcoin wrapper completions anyway. Take a look when you have the time, please (:

  13. bittoby commented at 9:23 PM on March 23, 2026: none

    Hey @hulxv, just a heads up. I'm going to open a new PR to finish the zsh completions for the legacy tools from #33402. That one's been stalled for a while so I'm picking it up.

    I know it conflicts with your PR here. My plan is to get the legacy tools done first, then you can just rebase on top of that. Let me know if that works for you or if you had other plans.

  14. hulxv commented at 5:26 AM on March 27, 2026: none

    Hey @hulxv, just a heads up. I'm going to open a new PR to finish the zsh completions for the legacy tools from #33402. That one's been stalled for a while so I'm picking it up.

    I know it conflicts with your PR here. My plan is to get the legacy tools done first, then you can just rebase on top of that. Let me know if that works for you or if you had other plans.

    Your PR doesn't conflict with mine because it's for the wrapper. I think it's good to go.

  15. sedited requested review from willcl-ark on Apr 19, 2026

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-05-02 12:12 UTC

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