1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-10 08:52:39 +01:00

Simplify arc help, add arc help --full

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
This commit is contained in:
vrana 2012-03-04 03:16:45 -08:00
parent ba21708513
commit ee21b3c661

View file

@ -160,16 +160,13 @@ EOTEXT
}
$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**
@ -180,6 +177,7 @@ EOTEXT
);
if (!$this->getArgument('full')) {
echo "Run 'arc help --full' to get commands and options descriptions.\n";
return;
}