* Why doesn't compinit use the -H typeset flag?
@ 2014-11-27 2:11 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2014-11-27 2:11 UTC (permalink / raw)
To: zsh-workers
Some very large arrays get built by compinit. Seems like they could be
safely hidden?
diff --git a/Completion/compinit b/Completion/compinit
index f9d2c57..e42430d 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -105,17 +105,17 @@ done
# The associative arrays containing the definitions for the commands and
# services.
-typeset -gA _comps _services _patcomps _postpatcomps
+typeset -gHA _comps _services _patcomps _postpatcomps
# `_compautos' contains the names and options for autoloaded functions
# that get options.
-typeset -gA _compautos
+typeset -gHA _compautos
# The associative array use to report information about the last
# completion to the outside.
-typeset -gA _lastcomp
+typeset -gHA _lastcomp
# Remember dumpfile.
if [[ -n $_i_dumpfile ]]; then
@@ -127,7 +127,7 @@ fi
# The standard options set in completion functions.
-typeset -ga _comp_options
+typeset -gHa _comp_options
_comp_options=(
bareglobqual
extendedglob
@@ -161,7 +161,7 @@ _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='local -A _comp_caller_options;
+typeset -gH _comp_setup='local -A _comp_caller_options;
_comp_caller_options=(${(kv)options[@]});
setopt localoptions localtraps localpatterns ${_comp_options[@]};
local IFS=$'\'\ \\t\\r\\n\\0\''
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-27 2:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-27 2:11 Why doesn't compinit use the -H typeset flag? Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).