- Extensions on Windows now enabled through the `sh.exe` interpreter
- `sh.exe` now found on Windows when git was installed via scoop
- `gh extensions list` command shows origin repo for the extension
- `gh extensions upgrade --all` is required to upgrade all extensions
- Added `gh extensions remove`
- Shell completions now include aliases and extension names
- `gh` help output now lists available extension names
- Extensions are stored to XDG_DATA_HOME
The linter picked up that the error value from cmd.Help() isn't checked.
Even though cmd.Help() returns an error value, it's always nil. The
inner HelpFunc() function directly prints the error message instead of
returning an error value.
If `GH_PAGER` is exists, set it as the pager even if one is
already set in config.
This allows a user to change/disable the pager per single invocation.
PS C:\Users\Junjie Yuan> gh auth status
github.com
✓ Logged in to github.com as junjieyuan (C:\Users\Junjie Yuan\.config\gh/hosts.yml)
✓ Git operations for github.com configured to use https protocol.
✓ Token: *******************
Signed-off-by: Junjie Yuan <yuan@junjie.pro>
Avoid displaying upgrade notice if any output is redirected. This also
alleviates the need to specifically check for `gh completion -s
<shell>`, `gh __complete`, and other scripting scenarios where we
absolutely don't want to trigger any upgrade checks or notices.
Here are the statuses:
- 0: success
- 1: misc. error
- 2: user interrupt/cancellation
- 4: authentication needed
These old exit codes are now changed to "1":
- we used to return "2" for config file errors;
- we used to return "2" for alias expansion errors;
- we used to return "3" for alias runtime errors.
I do not believe that there is a need to distinguish these specific
cases via exit status, and converting them to "1" frees codes "2" and
"3" for more practical use.
Before, when gh detected there was a new release in the `cli/cli` repo,
it would show this notice:
A new release of gh is available: {V1} → {V2}
Additionally, when the release was more than 24h old, we would show this
to Homebrew users:
To upgrade, run: brew update && brew upgrade gh
Ref. feb4acc2c0
This change makes it so that the original notice "A new release of gh is
available" is NOT shown to Homebrew users unless the release is older
than 24h. We effectively hide the fact that any release happened until
we're sure that the version bump has made it to `homebrew-core`.
When the update notifier is enabled and a new version was detected, show
a Homebrew upgrade notice if:
- the release was at least 24 hours ago; and
- the current `gh` binary is under the Homebrew prefix.