aboutsummaryrefslogtreecommitdiffstats
path: root/misc/completion/zsh
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-08-11 15:19:53 +0200
committerMichael Muré <batolettre@gmail.com>2023-08-11 15:19:53 +0200
commite97a40171beb8229104d4a50af2168346caf31bc (patch)
tree9f54704e64c7c3e39825442e0acb4e2c837a35e2 /misc/completion/zsh
parentf0499f2ba2eeac7b0ce1bd278119463ce3bedc6a (diff)
downloadgit-bug-e97a40171beb8229104d4a50af2168346caf31bc.tar.gz
regenerate after cobra update
Diffstat (limited to 'misc/completion/zsh')
-rw-r--r--misc/completion/zsh/git-bug11
1 files changed, 9 insertions, 2 deletions
diff --git a/misc/completion/zsh/git-bug b/misc/completion/zsh/git-bug
index 3ddfddb8..5da05031 100644
--- a/misc/completion/zsh/git-bug
+++ b/misc/completion/zsh/git-bug
@@ -1,4 +1,5 @@
#compdef git-bug
+compdef _git-bug git-bug
# zsh completion for git-bug -*- shell-script -*-
@@ -17,8 +18,9 @@ _git-bug()
local shellCompDirectiveNoFileComp=4
local shellCompDirectiveFilterFileExt=8
local shellCompDirectiveFilterDirs=16
+ local shellCompDirectiveKeepOrder=32
- local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace
+ local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder
local -a completions
__git-bug_debug "\n========= starting completion logic =========="
@@ -136,6 +138,11 @@ _git-bug()
noSpace="-S ''"
fi
+ if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then
+ __git-bug_debug "Activating keep order."
+ keepOrder="-V"
+ fi
+
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
# File extension filtering
local filteringCmd
@@ -171,7 +178,7 @@ _git-bug()
return $result
else
__git-bug_debug "Calling _describe"
- if eval _describe "completions" completions $flagPrefix $noSpace; then
+ if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then
__git-bug_debug "_describe found some completions"
# Return the success of having called _describe