about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_main_complete7
-rw-r--r--Completion/Core/compinit5
2 files changed, 12 insertions, 0 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 3ce7aa43f..330eb9161 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -49,6 +49,13 @@ for comp; do
   fi
 done
 
+# Now call the post-functions.
+
+for post in "$comppostfuncs[@]"; do
+  "$post"
+done
+comppostfuncs=()
+
 [[ "$compconfig[last_prompt]" = always ]] && compstate[last_prompt]=yes
 
 _lastcomp=( "${(@kv)compstate}" )
diff --git a/Completion/Core/compinit b/Completion/Core/compinit
index 83f24b9a9..914c446b2 100644
--- a/Completion/Core/compinit
+++ b/Completion/Core/compinit
@@ -112,6 +112,11 @@ fi
   compconfig[correct_prompt]='correct to:'
 (( ${+compconfig[completer]} )) || compconfig[completer]=_complete
 
+# This can hold names of functions that are to be called after all
+# matches have been generated.
+
+comppostfuncs=()
+
 # This function is used to register or delete completion functions. For
 # registering completion functions, it is invoked with the name of the
 # function as it's first argument (after the options). The other