about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/Core/_complete4
1 files changed, 3 insertions, 1 deletions
diff --git a/Completion/Core/_complete b/Completion/Core/_complete
index 1468e46ce..00c5e1e9a 100644
--- a/Completion/Core/_complete
+++ b/Completion/Core/_complete
@@ -4,7 +4,9 @@
 # a normal completion function, but as one possible value for the
 # completer style.
 
-local comp name curcontext="${curcontext}:complete" oldcontext
+local comp name curcontext="$curcontext" oldcontext
+
+[[ "$funcstack[2]" = _main_complete ]] && curcontext="${curcontext}:complete"
 
 oldcontext="$curcontext"