summaryrefslogtreecommitdiff
path: root/Completion/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_main_complete4
-rw-r--r--Completion/Core/compinit15
2 files changed, 17 insertions, 2 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 893930f7d..5c7484df4 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -16,8 +16,8 @@
# which makes the output of setopt and unsetopt reflect a different
# state than the global one for which you are completing.
-setopt localoptions nullglob rcexpandparam extendedglob unset
-unsetopt markdirs globsubst shwordsplit shglob ksharrays cshnullglob
+setopt localoptions $_comp_options
+
exec </dev/null # ZLE closes stdin, which can cause errors
# Failed returns from this code are not real errors
diff --git a/Completion/Core/compinit b/Completion/Core/compinit
index de11c8f8c..338dc18ad 100644
--- a/Completion/Core/compinit
+++ b/Completion/Core/compinit
@@ -120,6 +120,21 @@ else
_comp_dumpfile="${ZDOTDIR:-$HOME}/.zcompdump"
fi
+# The standard options set in completion functions.
+
+_comp_options=(
+ nullglob
+ rcexpandparam
+ extendedglob
+ unset
+ NO_markdirs
+ NO_globsubst
+ NO_shwordsplit
+ NO_shglob
+ NO_ksharrays
+ NO_cshnullglob
+)
+
# These can hold names of functions that are to be called before/after all
# matches have been generated.