Your message dated Tue, 15 May 2012 12:10:01 +0200
with message-id <20120515121001.267b137a@local>
and subject line Fixed with 1.99
has caused the Debian Bug report #467231,
regarding bash_completion is big and loads slowly; load-by-need proposed
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
467231: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467231
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: bash
Version: 3.1dfsg-9
Severity: wishlist
The default /etc/bash_completion in Debian/sid takes 216kb, and
a couple of scripts in /etc/bash_completion.d add another 100kb.
To load this, my system needs half a second, a perceivable and
quite annoying delay on every shell start.
I wrote a simple script, that automatically moves the completion
functions from /etc/bash_completion and /etc/bash_completion.d
to a separate directory and creates a drop-in replacement for
/etc/bash_completion - which will load any of those completion
functions when it is requested for the first time. By this, we
greatly reduce the loading time (the replacement script is ~30kb)
and also the memory footprint (as we rarely need every completion
function in every bash session).
The generator script is intended to be run once the base script
/etc/bash_completion is installed and then, every time something
is added to /etc/bash_completion.d. I'd like to propose it for
the bash package -- maybe as an optional part of installation.
The generator script is attached, any comments are welcome.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages bash depends on:
ii base-files 4.0.2 Debian base system miscellaneous f
ii debianutils 2.28.3 Miscellaneous utilities specific t
ii libc6 2.7-8 GNU C Library: Shared libraries
ii libncurses5 5.6+20080203-1 Shared libraries for terminal hand
Versions of packages bash recommends:
pn bash-completion <none> (no description available)
-- no debconf information
BASH_COMPLETION=/etc/bash_completion
BASH_DYNCOMPLETION=/etc/bash_dyncompletion
BASH_DYNCOMPLETION_DIR=/etc/bash_dyncompletion.d
echo "Read static completions from $BASH_COMPLETION"
. "$BASH_COMPLETION" || exit 1
echo "Create dynamic completion file $BASH_DYNCOMPLETION"
touch "$BASH_DYNCOMPLETION" || exit 1
echo "Create dynamic completion directory $BASH_DYNCOMPLETION_DIR"
mkdir -p "$BASH_DYNCOMPLETION_DIR" || exit 1
echo -n "Populate dynamic completion directory:"
FUNCS=$(declare -f | grep '^[a-zA-Z_][a-zA-Z0-9_]* () $' | cut -f 1 -d ' ')
for FN in $FUNCS ; do
echo -n " $FN"
declare -f $FN > "$BASH_DYNCOMPLETION_DIR/$FN"
eval "$FN () { . '$BASH_DYNCOMPLETION_DIR/$FN' ; $FN \"\$@\" ; }"
done
echo
echo "Write dynamic completion file $BASH_DYNCOMPLETION"
exec > "$BASH_DYNCOMPLETION"
cat <<EOF
# $(basename $BASH_DYNCOMPLETION) - load-by-need bash completions
# actual completion functions are stored in $BASH_DYNCOMPLETION_DIR
# this file and directory are generated from $BASH_COMPLETION
shopt -s extglob progcomp
EOF
declare -p BASH_COMPLETION 2>/dev/null
declare -p bash205 2>/dev/null
declare -p bash205b 2>/dev/null
declare -p bash3 2>/dev/null
declare -f
complete -p
exit 0
--- End Message ---
--- Begin Message ---
Version: 1:1.99-1
1.99 is a pre-release of what will be 2.0. This version already features
dynamic completion loading, I'm thus closing this bug.
Kindly,
David
--
. ''`. Debian developer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
signature.asc
Description: PGP signature
--- End Message ---
_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel