Diff
1diff --git a/dot_config/zsh/completions/flux.zsh b/dot_config/zsh/completions/flux.zsh
2index 6c53425226ad86d25b6d5bc4bf2ea478a153740b..a9d8dc59e6f8011f8f2be2419f05dfce6aa054ec 100644
3--- a/dot_config/zsh/completions/flux.zsh
4+++ b/dot_config/zsh/completions/flux.zsh
5@@ -1,4 +1,5 @@
6 #compdef flux
7+compdef _flux flux
8
9 # zsh completion for flux -*- shell-script -*-
10
11@@ -17,8 +18,9 @@ _flux()
12 local shellCompDirectiveNoFileComp=4
13 local shellCompDirectiveFilterFileExt=8
14 local shellCompDirectiveFilterDirs=16
15+ local shellCompDirectiveKeepOrder=32
16
17- local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace
18+ local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder
19 local -a completions
20
21 __flux_debug "\n========= starting completion logic =========="
22@@ -136,6 +138,11 @@ _flux()
23 noSpace="-S ''"
24 fi
25
26+ if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then
27+ __flux_debug "Activating keep order."
28+ keepOrder="-V"
29+ fi
30+
31 if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
32 # File extension filtering
33 local filteringCmd
34@@ -171,7 +178,7 @@ _flux()
35 return $result
36 else
37 __flux_debug "Calling _describe"
38- if eval _describe "completions" completions $flagPrefix $noSpace; then
39+ if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then
40 __flux_debug "_describe found some completions"
41
42 # Return the success of having called _describe
43diff --git a/dot_config/zsh/completions/gt.zsh b/dot_config/zsh/completions/gt.zsh
44deleted file mode 100644
45index 6cc0a71a6a2a7df25184a505f57dc953fec4b87d..0000000000000000000000000000000000000000
46--- a/dot_config/zsh/completions/gt.zsh
47+++ /dev/null
48@@ -1,19 +0,0 @@
49-#compdef gt
50-###-begin-gt-completions-###
51-#
52-# yargs command completion script
53-#
54-# Installation: gt completion >> ~/.zshrc
55-# or gt completion >> ~/.zprofile on OSX.
56-#
57-_gt_yargs_completions()
58-{
59- local reply
60- local si=$IFS
61- IFS=$'
62-' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" gt --get-yargs-completions "${words[@]}"))
63- IFS=$si
64- _describe 'values' reply
65-}
66-compdef _gt_yargs_completions gt
67-###-end-gt-completions-###