Closed Bug 1051987 Opened 11 years ago Closed 11 years ago

Hide the disabled commands in mach by default

Categories

(Testing :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Sylvestre, Assigned: Sylvestre)

Details

Attachments

(1 file, 1 obsolete file)

By default, hide the disabled commands. They are eating the display for no value to the developer. Especially at the end of the display... What really matter are the available commands. $ ./mach -v help bring them back.
Attachment #8470920 - Flags: review?(jmaher)
With the correct patch.
Attachment #8470920 - Attachment is obsolete: true
Attachment #8470920 - Flags: review?(jmaher)
Attachment #8470922 - Flags: review?(jmaher)
Comment on attachment 8470922 [details] [diff] [review] 0001-By-default-hide-the-disabled-commands.patch Review of attachment 8470922 [details] [diff] [review]: ----------------------------------------------------------------- I approve of this. Does |mach help| print the "The disabled commands are hidden by default. Use -v to display them." message with this patch? If not, that could lead to confusion. I'd really like a notice at the bottom of |mach help| stating the existence of disabled commands and how to access info on them. ::: python/mach/mach/dispatcher.py @@ +196,4 @@ > if disabled_commands and 'disabled' in r.categories: > title, description, _priority = r.categories['disabled'] > group = parser.add_argument_group(title, description) > + if verbose == True: |if foo == True| is almost always a bad idea. Just use |if foo|.
Attachment #8470922 - Flags: feedback+
(In reply to Gregory Szorc [:gps] from comment #2) > Does |mach help| print the "The disabled commands are hidden by default. Use > -v to display them." message with this patch? If not, that could lead to > confusion. I'd really like a notice at the bottom of |mach help| stating the > existence of disabled commands and how to access info on them. Yes, it does. Without "-v", the result is: [...] webidl-example Generate example files for a WebIDL interface. Disabled: The disabled commands are hidden by default. Use -v to display them. These commands are unavailable for your current context, run "mach <command>" to see why. > ::: python/mach/mach/dispatcher.py > @@ +196,4 @@ > > if disabled_commands and 'disabled' in r.categories: > > title, description, _priority = r.categories['disabled'] > > group = parser.add_argument_group(title, description) > > + if verbose == True: > > |if foo == True| is almost always a bad idea. Just use |if foo|. Right. Thanks.
Comment on attachment 8470922 [details] [diff] [review] 0001-By-default-hide-the-disabled-commands.patch Review of attachment 8470922 [details] [diff] [review]: ----------------------------------------------------------------- great stuff here.
Attachment #8470922 - Flags: review?(jmaher) → review+
Assignee: nobody → sledru
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: