about summary refs log tree commit diff
path: root/Completion/compinit
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-18 20:19:01 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-18 20:19:01 +0000
commit7f304c7736b15f7606376a4ee07f21cbcb35fd0e (patch)
tree6ff8555ca005e773c26d4634f8fdd23ddb0c4366 /Completion/compinit
parentbf43db124afac747c1efb02716092b107bc66ad1 (diff)
downloadzsh-7f304c7736b15f7606376a4ee07f21cbcb35fd0e.tar.gz
zsh-7f304c7736b15f7606376a4ee07f21cbcb35fd0e.tar.xz
zsh-7f304c7736b15f7606376a4ee07f21cbcb35fd0e.zip
25068: Fix some completion warnings with WARN_CREATE_GLOBAL
Diffstat (limited to 'Completion/compinit')
-rw-r--r--Completion/compinit8
1 files changed, 7 insertions, 1 deletions
diff --git a/Completion/compinit b/Completion/compinit
index 6a0668781..de19390a1 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -118,6 +118,7 @@ typeset -gA _compautos
 typeset -gA _lastcomp
 
 # Remember dumpfile.
+typeset -g _comp_dumpfile
 if [[ -n $_i_dumpfile ]]; then
   # Explicitly supplied dumpfile.
   _comp_dumpfile="$_i_dumpfile"
@@ -127,6 +128,7 @@ fi
 
 # The standard options set in completion functions.
 
+typeset -ga _comp_options
 _comp_options=(
        bareglobqual
        extendedglob
@@ -158,14 +160,18 @@ _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
 _comp_setup='setopt localoptions localtraps ${_comp_options[@]};
              local IFS=$'\'\ \\t\\r\\n\\0\''
              exec </dev/null;
-             trap - ZERR'
+             trap - ZERR
+             local -a reply
+             local REPLY'
 
 # These can hold names of functions that are to be called before/after all
 # matches have been generated.
 
+typeset -ga compprefuncs comppostfuncs
 compprefuncs=()
 comppostfuncs=()