Skip to content

Make gh-help consistent #177

@owenthereal

Description

@owenthereal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions