about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Completer/_expand2
-rw-r--r--Completion/Unix/Type/_have_glob_qual4
-rw-r--r--Completion/Unix/Type/_path_files2
-rw-r--r--Completion/compinit4
4 files changed, 7 insertions, 5 deletions
diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand
index 89cc969c5..44954a2a8 100644
--- a/Completion/Base/Completer/_expand
+++ b/Completion/Base/Completer/_expand
@@ -70,7 +70,7 @@ if [[ "$force" = *s* ]] ||
 ###  parameter expressions such as ${foo} be expanded like brace
 ###  expansions, too (and with braceccl set...).
 
-   if [[ ! -o ignorebraces && "${#${exp}//[^\{]}" = "${#${exp}//[^\}]}" ]]; then
+   if [[ ! $_comp_caller_options[ignorebraces] == on && "${#${exp}//[^\{]}" = "${#${exp}//[^\}]}" ]]; then
      local otmp
 
      tmp=${(q)word}
diff --git a/Completion/Unix/Type/_have_glob_qual b/Completion/Unix/Type/_have_glob_qual
index d174406df..7b558bfd5 100644
--- a/Completion/Unix/Type/_have_glob_qual
+++ b/Completion/Unix/Type/_have_glob_qual
@@ -16,9 +16,9 @@ local complete
 [[ $2 = complete ]] && complete=")"
 
 [[ -z $compstate[quote] &&
-  ( -o bareglobqual &&
+  ( $_comp_caller_options[bareglobqual] == on &&
        $1 = (#b)(((*[^\\\$]|)(\\\\)#)\()([^\)\|\~]#)$complete &&
        ${#match[1]} -gt 1 ||
-     -o extendedglob &&
+     $_comp_caller_options[extendedglob] == on &&
        $1 = (#b)(((*[^\\\$]|)(\\\\)#)"(#q")([^\)]#)$complete
     ) ]]
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 1c272baba..858fe3f74 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -16,7 +16,7 @@ local -a match mbegin mend
 # The later test looks for an outstanding quote.
 if _have_glob_qual $PREFIX; then
    compset -p ${#match[1]}
-   if [[ -o extendedglob ]] && compset -P '\#'; then
+   if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then
      _globflags
    else
      _globquals
diff --git a/Completion/compinit b/Completion/compinit
index d3c5e28b5..a0f2348a9 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -160,7 +160,9 @@ _comp_options=(
 # have a valid stdin descriptor (zle closes it before calling widgets)
 # and don't get confused by user's ZERR trap handlers.
 
-typeset -g _comp_setup='setopt localoptions localtraps ${_comp_options[@]};
+typeset -g _comp_setup='local -A _comp_caller_options;
+             _comp_caller_options=(${(kv)options});
+             setopt localoptions localtraps ${_comp_options[@]};
              local IFS=$'\'\ \\t\\r\\n\\0\''
              exec </dev/null;
              trap - ZERR