[Bug 790043] Re: Bash-completion slows up the start of bash
Peter Cordes
peter at cordes.ca
Tue Dec 2 10:05:39 UTC 2014
So to be clear, the changes I'm suggesting are:
* /etc/skel/.bashrc (pkg=base-files) change the progcomp check to an un-commented
# enable programmable completion
[[ -e /etc/profile.d/bash_completion.sh ]] && . /etc/profile.d/bash_completion.sh
* /etc/bash.bashrc (pkg=bash): remove the progcomp commented-out section, maybe replace with a comment like:
# enable programmable completion with this line, here or (default) in ~/.bashrc
# [[ -e /etc/profile.d/bash_completion.sh ]] && . /etc/profile.d/bash_completion.sh
Root's /root/.bashrc doesn't come into play on an ubuntu system,
normally. Even if you use sudo -s, HOME doesn't change, so you still
get your own ~/.bashrc
If you're mucking around with testing corner cases, put
echo "bash_completion callstack: ${BASH_SOURCE[*]}"
in /usr/share/bash-completion/bash_completion to get output like
bash_completion callstack: /usr/share/bash-completion/bash_completion /etc/profile.d/bash_completion.sh /home/peter/.bashrc
Or drop that line into /etc/bash_completion.d/trace, if you don't want
to modify a non-conffile.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/790043
Title:
Bash-completion slows up the start of bash
Status in bash-completion package in Ubuntu:
Triaged
Bug description:
Binary package hint: bash-completion
I have been noticing that bash has unusually slow start-up times.
After looking into the problem, I found out this is mostly caused by
the execution of /etc/bash_completion (calls to this exist in several
places). Of course, removing them speeds up the start but leaves a
less functional shell. As a work-around I would like to suggest
starting up /etc/bash_completion in the background. In this way, bash
will start quickly, have access only to basic built-in completions for
the first 2 seconds until /etc/bash_completion finishes executing.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: bash-completion 1:1.3-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Sun May 29 22:43:51 2011
EcryptfsInUse: Yes
PackageArchitecture: all
ProcEnviron:
LANGUAGE=en_US.UTF-8:en
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: bash-completion
UpgradeStatus: Upgraded to natty on 2011-04-24 (35 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/790043/+subscriptions
More information about the foundations-bugs
mailing list