iterative / shtab

↔️ Automagic shell tab completion for Python CLI applications
https://docs.iterative.ai/shtab
Other
378 stars 34 forks source link

expand help `'%(variables)'` #140

Closed FederAndInk closed 1 year ago

FederAndInk commented 1 year ago

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 commented 1 year ago

fixes #104 #46

codecov-commenter commented 1 year ago

Codecov Report

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

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/iterative/shtab/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative) | Coverage Δ | | |---|---|---| | [shtab/\_\_init\_\_.py](https://app.codecov.io/gh/iterative/shtab/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-c2h0YWIvX19pbml0X18ucHk=) | `90.76% <100.00%> (+0.21%)` | :arrow_up: |

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

casperdcl commented 1 year ago

/tag v1.6.3 a6f5ba9