Summary:
`arc help` currently prints more than 500 lines and it is hardly usable without ##> arc.help##, ##| less##, ##| grep##, ##| wc -l## or such.
It is even worse with custom commands and options.
This diff changes `arc help` to only list commands with no description (under 100 lines).
It also adds `arc help --full` which maintains the original behavior.
It doesn't change `arc help <command>`.
NOTE: BC break on different levels.
Test Plan:
arc help
arc help --full
arc help help
arc help lint
Reviewers: epriestley
Reviewed By: epriestley
CC: nh, aran, epriestley
Differential Revision: https://secure.phabricator.com/D1769
}
$self = 'arc';
- $description = ($this->getArgument('full') ?
- "This help file provides a detailed command reference." :
- "Run 'arc help --full' to get detailed command reference.");
echo phutil_console_format(<<<EOTEXT
**NAME**
**{$self}** - arcanist, a code review and revision management utility
**SYNOPSIS**
**{$self}** __command__ [__options__] [__args__]
- {$description}
+ This help file provides a detailed command reference.
**COMMAND REFERENCE**
);
if (!$this->getArgument('full')) {
+ echo "Run 'arc help --full' to get commands and options descriptions.\n";
return;
}