gh icon indicating copy to clipboard operation
gh copied to clipboard

Make gh-help consistent

Open owenthereal opened this issue 11 years ago • 1 comments

Currently for wrapped commands:

$ git help clone
the `gh-clone` man page

$ gh help clone
usage: git clone [-p] OPTIONS [USER/]REPOSITORY DIRECTORY

Clone repository "git://github.com/USER/REPOSITORY.git" into
DIRECTORY as with git-clone(1). When USER/ is omitted, assumes
your GitHub login. With -p, clone private repositories over SSH.
For repositories under your GitHub login, -p is implicit.

$ gh clone -h
output same as `git clone -h`

$ gh clone --help
output same as `git clone --help`, the `gh-clone` man page

for custom commands:

$ gh help ci-status
usage: git ci-status [-v] [COMMIT]

Looks up the SHA for <COMMIT> in GitHub Status API and displays the latest
status. Exits with one of:
success (0), error (1), failure (1), pending (2), no status (3)

If "-v" is given, additionally print the URL to CI build results.

$ gh ci-status -h
output same as `gh help ci-status`

$ gh ci-status -h
output same as `gh help ci-status`

I'm thinking a couple improvements here:

  • gh help CMD
    • for wrapped commands, it prints the man page of git-CMD with extra info on how it's extended
    • for custom commands, it prints the man page of gh-CMD. We need to generate man page separately for each custom command
  • gh CMD -h
    • for wrapped commands, it prints git CMD -h with extra info on how it's extended
  • gh CMD --help
    • for wrapper commands, it prints the man page of git-CMD with extra info on how it's extended. Same output as gh help CMD
    • for custom commands, it prints the man page of gh-CMD. Same output as gh help CMD

owenthereal avatar Jan 10 '14 16:01 owenthereal

+1

wilmoore avatar Apr 02 '14 04:04 wilmoore