summaryrefslogtreecommitdiffstats
path: root/Completion/Core
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-10-19 08:58:17 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-10-19 08:58:17 +0000
commite14a02f4408039ce7aa46ea085a7cf9156e648d0 (patch)
treec542746463209137959b70c977e7d86268129de4 /Completion/Core
parentmake non-blocking IO on ptys work again; add -t option to test if command is ... (diff)
downloadzsh-e14a02f4408039ce7aa46ea085a7cf9156e648d0.tar
zsh-e14a02f4408039ce7aa46ea085a7cf9156e648d0.tar.gz
zsh-e14a02f4408039ce7aa46ea085a7cf9156e648d0.tar.bz2
zsh-e14a02f4408039ce7aa46ea085a7cf9156e648d0.tar.lz
zsh-e14a02f4408039ce7aa46ea085a7cf9156e648d0.tar.xz
zsh-e14a02f4408039ce7aa46ea085a7cf9156e648d0.tar.zst
zsh-e14a02f4408039ce7aa46ea085a7cf9156e648d0.zip
simplify setting standard completion system options using $_comp_options (13036)
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.