completions: offer --help and --version in zsh and short flags in bash, and test them
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 71/100
Research direction
Read completions/btc-toolkit.zsh, the bash and fish completion files, tests/test_completions.py, and btc_toolkit/api.py for SUPPORTED_NETWORKS; inspect the parser through cli.build_parser() as the issue describes. Update the zsh and bash completions, then extend the tests to compare flags, network choices, and value-taking options across all three files. Done when the stated acceptance cases work and the tests detect each listed omission.
Written by the indexing model from the issue text.
Description
What
- zsh does not complete
--helpor--versionat the top level (btc-toolkit --ver<Tab>); bash and fish do. See theCURRENT == 2branch incompletions/btc-toolkit.zsh. - bash offers no short flags (
-n,-hin a subcommand;-h,-vat the top level); fish does. tests/test_completions.pycompares the completions with the commands and long flags only, and the real-shell tests try five fixed inputs, of which onlyblock 0 -n s→signettouches a short flag or a network value. Nothing checks the top-level options, the other short options, the full list of-nvalues (they should matchSUPPORTED_NETWORKSinbtc_toolkit/api.py) or which flags take a value: today a completion file can droptestnet, or fish can drop--version, and the suite still passes.
What to do
- Fix the zsh and bash completions.
- Extend
tests/test_completions.pyso it reads the real parser (cli.build_parser()and its subparsers: each action'soption_strings,choicesandnargs;nargsis0for a flag andNonefor an option that takes one value) and checks the three files against it, including the top-level options and the-nvalues.
Acceptance
btc-toolkit --ver<Tab>completes in zsh;btc-toolkit tx -<Tab>offers-nin bash.- The extended tests fail if a completion file drops a flag, a short flag or a network value.
- They also fail if a file stops treating an option that takes a value (
nargsisNone) as one: in bash it must be in acasebranch that completes nothing or the value, in fish it needs-xor-r, in zsh a:message:after its description.
See CONTRIBUTING.md for the test, lint and type-check commands. Comment below before starting, so two people don't take the same issue.
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- Avg merge
- 1h 45m
- Merged PRs (30d)
- 23
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devdavidejesus/btc-toolkit
-
tests: assert which API paths each command requestsPossibly taken @omarelshamy25x claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
devdavidejesus/btc-toolkit#107 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
devdavidejesus/btc-toolkit#104 ·
Maintainers usually reply within 1 day
-
test(verify): cover invalid bits, the mainnet and testnet limits, and the strong thresholdPossibly taken @omarelshamy25x claimed this 1 day ago. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
devdavidejesus/btc-toolkit#99 · 1 comment ·
Maintainers usually reply within 1 day
-
api: reject a /tx response that has no txid fieldPossibly taken @pkray2012 claimed this 1 day ago. Openenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
devdavidejesus/btc-toolkit#103 ·
Maintainers usually reply within 1 day
-
cli: Ctrl+C should stop btc-toolkit without a tracebackPossibly taken @jay23606 claimed this 1 day ago. Openbug good first issue
Difficulty 3/5 1-2 days Newbie friendliness 25/100
devdavidejesus/btc-toolkit#102 ·
Maintainers usually reply within 1 day
All issues in devdavidejesus/btc-toolkit
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
daniel-ospina/tortoise#15308 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
difficulty:easy prio:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NatronGitHub/Natron#2405 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Jstar269/nakagawa-recomp#3746 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day