mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Zsh gh completion: Show PRs in descending order
This is a bit of a hack - rather than configuring the order properly, which I can't figure out how to do properly, I'm just setting the zstyle at the start, then resetting it at the end
This commit is contained in:
@@ -305,6 +305,9 @@ function _gh_issue_view {
|
|||||||
function _gh_pr {
|
function _gh_pr {
|
||||||
local -a commands
|
local -a commands
|
||||||
|
|
||||||
|
zstyle -s ':completion:*:*:gh:argument-1:' sort oldsort # Save the sort setting
|
||||||
|
zstyle ':completion:*:*:gh:argument-1:' sort false
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
'(-R --repo)'{-R,--repo}'[Select another repository using the `OWNER/REPO` format]:' \
|
'(-R --repo)'{-R,--repo}'[Select another repository using the `OWNER/REPO` format]:' \
|
||||||
'--help[Show help for command]' \
|
'--help[Show help for command]' \
|
||||||
@@ -365,6 +368,8 @@ function _gh_pr {
|
|||||||
_gh_pr_view
|
_gh_pr_view
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
zstyle ':completion:*:*:gh:argument-1:' sort $oldsort # Restore the sort setting
|
||||||
}
|
}
|
||||||
|
|
||||||
function __pr_numbers {
|
function __pr_numbers {
|
||||||
|
|||||||
Reference in New Issue
Block a user