about summary refs log tree commit diff
path: root/Completion/Core/_tags
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_tags')
-rw-r--r--Completion/Core/_tags16
1 files changed, 15 insertions, 1 deletions
diff --git a/Completion/Core/_tags b/Completion/Core/_tags
index 5294ab3c7..5519cc6cf 100644
--- a/Completion/Core/_tags
+++ b/Completion/Core/_tags
@@ -4,7 +4,7 @@ if (( $# )); then
 
   # We have arguments: the tags supported in this context.
 
-  local curcontext="$curcontext"
+  local curcontext="$curcontext" order
 
   if [[ "$1" = -C?* ]]; then
     curcontext="${curcontext}:${1[3,-1]}"
@@ -18,6 +18,20 @@ if (( $# )); then
 
   [[ "$1" = -(|-) ]] && shift
 
+
+  if _style -a '' group-order order; then
+    local name
+
+    for name in "$order[@]"; do
+      compadd -J "$name"
+      compadd -V "$name"
+      compadd -J "$name" -1
+      compadd -V "$name" -1
+      compadd -J "$name" -2
+      compadd -V "$name" -2
+    done
+  fi
+
   # Set and remember offered tags.
 
   comptags -i "$curcontext" "$@"