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

fix #45 #46

Merged
merged 4 commits into from
Mar 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use try/except for --foo/--no-foo
  • Loading branch information
ewels committed Mar 28, 2022
commit 997962e4cf061e9ea95586a16a906662a034d6e0
4 changes: 3 additions & 1 deletion src/rich_click/rich_click.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,10 @@ def rich_format_help(
opt_short_strs = []
for idx, opt in enumerate(param.opts):
opt_str = opt
if param.secondary_opts:
try:
opt_str += "/" + param.secondary_opts[idx]
except IndexError:
pass
if "--" in opt:
opt_long_strs.append(opt_str)
else:
Expand Down