Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: add shell completions generator #3343

Merged
merged 3 commits into from
Jul 5, 2024
Merged

cli: add shell completions generator #3343

merged 3 commits into from
Jul 5, 2024

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented May 31, 2024

Describe your changes

Adds namada complete command to generate shell completions. Requires --shell with one of:

  • bash
  • elvish
  • fish
  • powershell
  • zsh
  • nushell

To use in e.g. bash, run namada complete --shell bash > /usr/share/bash-completion/completions/namada.bash.

Indicate on which release or other PRs this topic is based on

0.39.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

tzemanovic added a commit that referenced this pull request May 31, 2024
@tzemanovic tzemanovic marked this pull request as ready for review May 31, 2024 12:54
tzemanovic added a commit that referenced this pull request May 31, 2024
@tzemanovic tzemanovic requested a review from sug0 May 31, 2024 12:55
Copy link
Contributor

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

couple of nits

crates/sdk/src/args.rs Outdated Show resolved Hide resolved
crates/apps_lib/src/cli.rs Outdated Show resolved Hide resolved
@tzemanovic tzemanovic mentioned this pull request May 31, 2024
sug0
sug0 previously approved these changes Jun 3, 2024
brentstone added a commit that referenced this pull request Jun 5, 2024
* tomas/shell-complete:
  fixup! cli: add shell completions generator
  changelog: add #3343
  cli: add shell completions generator
@brentstone
Copy link
Collaborator

@tzemanovic there is a problem in test-unit trying to build clap 4.5

@tzemanovic
Copy link
Member Author

fixed the sdk build issue in 1cf6192

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 84 lines in your changes missing coverage. Please review.

Project coverage is 53.89%. Comparing base (879a326) to head (75a2fdc).

Files Patch % Lines
crates/apps_lib/src/cli.rs 0.00% 51 Missing ⚠️
crates/sdk/src/args.rs 0.00% 33 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3343      +/-   ##
==========================================
- Coverage   53.92%   53.89%   -0.04%     
==========================================
  Files         317      317              
  Lines      107575   107638      +63     
==========================================
- Hits        58011    58007       -4     
- Misses      49564    49631      +67     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brentstone brentstone mentioned this pull request Jun 6, 2024
brentstone added a commit that referenced this pull request Jun 6, 2024
* tomas/shell-complete:
  update Cargo.lock
  changelog: add #3343
  cli: add shell completions generator
@brentstone brentstone merged commit 7db0bd0 into main Jul 5, 2024
15 of 19 checks passed
@brentstone brentstone deleted the tomas/shell-complete branch July 5, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants