-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Do not show global options for subcommands by default #4433
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
Conversation
I'm personnaly -0 on this. |
I agree with @xavfernandez. Lots of programs have long help texts. Typically, the solution is for the user to pipe the help through a pager. IMO, doing what other programs do is more discoverable than hiding a chunk of our help behind an unconventional |
@xavfernandez Mercurial, obviously, cares about user experience, so they do provide this command. The rationale is to filter important level 1 stuff for user rather than leaving him to grasp through the mess himself. Back in 19xx people have plenty of time to read manuals with all irrelevant info, but in the age of StackOverflow it is just annoying. |
FWIW, the setup.py command does something similar with its help invocation, with its more verbose incarnation called
|
Personally, I find it easier to just pass it the help command through a pager. I'd argue it's better to expect people to just run |
This omits global options for subcommands help unless explicitly requested with -v --verbose
Rebasing old commits. Problems with |
@@ -31,6 +31,6 @@ def run(self, options, args): | |||
raise CommandError(' - '.join(msg)) | |||
|
|||
command = commands_dict[cmd_name]() | |||
command.parser.print_help() | |||
command.print_help() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe pass verbose=True here? or even options.verbose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. but I forgot how to run pip from checkout. Rebased here - #5746
Fair enough. But there would some pager on your system... Anyway, FWIW, I'm a +0 on this. |
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
Is there still interest in this? |
There is interest, but no time. |
I'll close this PR and open a tracking issue. |
(hopefully, nobody minds) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Rebased #3319, which got bitrotten.
'list -h' help is too long to fit one screen, so this PR omits global options for subcommands help unless explicitly requested with --verbose flag.