Accept the "HOST/OWNER/REPO" syntax or passing a full URL for both the
`--repo` flag and the GH_REPO environment variable and allow setting
GH_HOST environment variable to override just the hostname for
operations that assume "github.com" by default.
Examples:
$ gh repo clone example.org/owner/repo
$ GH_HOST=example.org gh repo clone repo
$ GH_HOST=example.org gh api user
$ GH_HOST=example.org gh gist create myfile.txt
$ gh issue list -R example.org/owner/repo
$ gh issue list -R https://example.org/owner/repo.git
$ GH_REPO=example.org/owner/repo gh issue list
- short command usage output now lists subcommands instead of flags for
parent commands
- mistyping a subcommand now results in a non-zero exit status
- requesting `--help` or `-h` for any command now prints help docs on
stdout and exits with 0
This is due to the fact that `gh completion` can be programatically used
during shell startup and we definitely don't want to
1. slow down people's startup time
2. show any upgrade notice until the user has invoked `gh` manually
For `net.DNSError`, the full error message can be scary. Instead, print "error
connecting to HOST" and hint that the user should check their internet connection
or githubstatus.com.
When $DEBUG is set, the full DNS error is printed like before.
Fixes#206
`make site-docs`:
1. checks out the `gh-pages` branch into the `site/` directory;
2. regenerates `.md` help pages using Cobra;
3. commits and publishes updates.