Skip to content

Comments

feat: add completions subcommand#237

Open
va-an wants to merge 5 commits intobitcoindevkit:masterfrom
va-an:feat/add-completions-cmd
Open

feat: add completions subcommand#237
va-an wants to merge 5 commits intobitcoindevkit:masterfrom
va-an:feat/add-completions-cmd

Conversation

@va-an
Copy link
Contributor

@va-an va-an commented Feb 7, 2026

Description

Resolves #234.

Added completions subcommand to generate shell completions.

How to test

Install bdk-cli:

cargo install --path . --all-features

See how to install completions for your shell:

bdk-cli completions --help

For example, to install completions for zsh:

bdk-cli completions zsh > ~/.zfunc/_bdk-cli

After restarting the shell, completions should work with Tab.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature
  • I've updated CHANGELOG.md

@coveralls
Copy link

coveralls commented Feb 7, 2026

Pull Request Test Coverage Report for Build 21858546890

Details

  • 0 of 16 (0.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 10.686%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils.rs 0 1 0.0%
src/error.rs 0 3 0.0%
src/handlers.rs 0 6 0.0%
src/payjoin/mod.rs 0 6 0.0%
Totals Coverage Status
Change from base Build 21153868360: -0.03%
Covered Lines: 268
Relevant Lines: 2508

💛 - Coveralls

Copy link
Contributor

@AmosOO7 AmosOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @va-an , nice work on this. I tested and it worked fine on my end.

I left a comment on some part in the command.rs file that I think should be moved to the README.md file.

Also I had to create the folders bash-completion, and completions in ~/.local/share I don't know if this is peculiar to my case, but maybe it is something you can add in the readme file also to mkdir this folders so the command bdk-cli completions bash > ~/.local/share/bash-completion/completions/bdk-cli runs smoothly and for any other commands that might need it.

@va-an
Copy link
Contributor Author

va-an commented Feb 10, 2026

Also I had to create the folders bash-completion, and completions in ~/.local/share I don't know if this is peculiar to my case, but maybe it is something you can add in the readme file also to mkdir this folders so the command bdk-cli completions bash > ~/.local/share/bash-completion/completions/bdk-cli runs smoothly and for any other commands that might need it.

Thank you for catching this!
I updated the help for completions, made the formatting cleaner, and added information about creating the directory.

@va-an va-an requested a review from AmosOO7 February 10, 2026 09:10
Copy link
Contributor

@AmosOO7 AmosOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e173b47

@tvpeter tvpeter moved this to Ready to Review in BDK-CLI Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to Review

Development

Successfully merging this pull request may close these issues.

Add shell completions command

3 participants