about summary refs log tree commit diff
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
parentbf43db124afac747c1efb02716092b107bc66ad1 (diff)
downloadzsh-7f304c7736b15f7606376a4ee07f21cbcb35fd0e.tar.gz
zsh-7f304c7736b15f7606376a4ee07f21cbcb35fd0e.tar.xz
zsh-7f304c7736b15f7606376a4ee07f21cbcb35fd0e.zip
25068: Fix some completion warnings with WARN_CREATE_GLOBAL
-rw-r--r--ChangeLog3
-rw-r--r--Completion/compinit8
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ace2ac077..e0a3e1324 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-05-18  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 25068: Completion/compinit: fix some warnings with
+	WARN_CREATE_GLOBAL.
+
 	* 25063: Functions/Prompts/prompt_bart_setup: minor
 	tweaks.
 
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=()