From 72ebf19e52e7c4b270e40ba07fec1048b3612797 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 19 Feb 2020 01:20:18 -0500 Subject: [PATCH] command: add a `repo help` tip to --help output For people used to running `repo xxx --help`, they might not realize that there are detailed man pages behind `repo help xxx`. Add a note to all --help commands to improve discoverability. Change-Id: I84af58aa0514cc7ead185f6c2534a8f88e09a236 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255853 Tested-by: Mike Frysinger Reviewed-by: David Pursehouse --- command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command.py b/command.py index d4d86798..b1fa0ef5 100644 --- a/command.py +++ b/command.py @@ -66,7 +66,8 @@ class Command(object): usage = self.helpUsage.strip().replace('%prog', me) except AttributeError: usage = 'repo %s' % self.NAME - self._optparse = optparse.OptionParser(usage=usage) + epilog = 'Run `repo help %s` to view the detailed manual.' % self.NAME + self._optparse = optparse.OptionParser(usage=usage, epilog=epilog) self._Options(self._optparse) return self._optparse