Skip to content

Comments

expand help '%(variables)'#140

Merged
casperdcl merged 3 commits intoiterative:mainfrom
FederAndInk:main
Jul 24, 2023
Merged

expand help '%(variables)'#140
casperdcl merged 3 commits intoiterative:mainfrom
FederAndInk:main

Conversation

@FederAndInk
Copy link
Contributor

This uses the formatter in ArgumentParser to expend %(variables) in help strings:

e.g:

-{--mode,-m}"[Update mode (where \%(metavar)s is \%(choices)s\; default is \%(default)s)]:mode:(patch srcrev auto)"
+`{--mode,-m}"[Update mode (where MODE is patch, srcrev, auto\; default is auto)]:mode:(patch srcrev auto)"

@FederAndInk
Copy link
Contributor Author

FederAndInk commented Jul 13, 2023

fixes #104 #46

@casperdcl casperdcl added enhancement New feature or request good-first-issue Good for newcomers (good-first-issue) external-request You asked, we did labels Jul 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.22 🎉

Comparison is base (a81c261) 88.66% compared to head (749d73e) 88.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   88.66%   88.88%   +0.22%     
==========================================
  Files           3        3              
  Lines         353      360       +7     
==========================================
+ Hits          313      320       +7     
  Misses         40       40              
Impacted Files Coverage Δ
shtab/__init__.py 90.76% <100.00%> (+0.21%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@casperdcl casperdcl changed the title expend help %(variables) in zsh completion expand help '%(variables)' Jul 24, 2023
Copy link
Collaborator

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

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

thanks!

@casperdcl casperdcl merged commit a6f5ba9 into iterative:main Jul 24, 2023
@casperdcl
Copy link
Collaborator

/tag v1.6.3 a6f5ba9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request external-request You asked, we did good-first-issue Good for newcomers (good-first-issue) shell-zsh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] %(default)s should be replaced with action.default. Handle argparse %(default)s placeholder (and others?)

3 participants