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 <vapier@google.com>
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
diff --git a/command.py b/command.py
index d4d8679..b1fa0ef 100644
--- a/command.py
+++ b/command.py
@@ -66,7 +66,8 @@
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