summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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=()