Command `short_help` is ignored
See original GitHub issueHi @ewels, I came across another discrepancy between click
and rich-click
that’s giving me a little trouble: how command short help is handled.
click
generates short help from the first sentence of the command’s help unless short_help
is explicitly passed to the command, in which case that will be used. rich-click
seems to use the first paragraph instead, and you can’t overwrite it using short_help
.
Here’s a minimum reproducible example using rich-click==1.2.0
.
@click.group()
def foo():
"""
Help for group.
"""
pass
@foo.command()
def command():
"""
Help for command. This sentence shouldn't be included in the short help.
"""
pass
@foo.command(short_help="This won't be used by rich-click")
def command2():
"""
This should be overwritten by the explicitly passed short-help.
"""
pass
Output of foo --help
using click
:
And using rich-click
:
Thanks again for making rich-click
!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Pytest exit codes for command line errors look incorrect #3913
This line seems to be the culprit. argparse.ArgumentParser.error exits with status code 2. One possible solution is to override the error ...
Read more >API — Click Documentation (8.1.x)
Instructs click to ignore options that a command does not understand and will store it on the context for later processing. This is...
Read more >Python command line arguments ignored for standard user ...
I'm trying to run a Python script from the command line in Windows 7, but the interpreter seems to ignore all commend line...
Read more >Command Line Options
Taylor support the following command line options. Usage: . ... Note: If the -header flag is not used, this flag is ignored. ......
Read more >ReFrame Command Line Reference - Read the Docs
The reframe command is part of ReFrame's frontend. ... Ignore tests with conflicting names when loading. ... Print a short help message and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Published in v1.2.1 https://pypi.org/project/rich-click/1.2.1/
Works perfectly. Thanks again @ewels!