You are not logged in.
getting sick of having to wait a second or so anytime i load a new shell to see my PS1.
i found out that the sole culprit is sourcing /etc/bash_completion.
I know you can already start typing when processing .bashrc and /etc/bash.bashrc is still ongoing, but it's kinda ugly.
anyone knows how to make it faster?
just some ideas that may [not] be feasible/possible:
- load completions in the background (`source` is synchronous though)
- show PS1 already when completions are not loaded yet. maybe we could make it so that the end of .bashrc you change the color of PS1.
- make a custom package of bash-completion that has no files for stuff i don't use (apt, moosay, yum etc)
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
I sped starting a shell up with changing to zsh. Also the autocompletion itself is faster.
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
I didn't believe you in #bash. ;)
Anyway, you can try set -a or export -f function_name (lots of functions in bash_completion so exporting them one by one isn't practical).
Putting set -a in ~/.bash_profile will export everything. This could be a solution since that file is only sourced during login shells, meaning it'll only load it once per vc. Now instead of sourcing bash_completion from bashrc, do it from bash_profile.
The trade-off is that now these functions/variables are available in non-interactive instances like scripts, which shouldn't be a problem since good scripts define their functions or source them at runtime.
Edit: make sure SHELLOPTS is not exported, else the -a attribute gets inherited.
Last edited by pwd (2009-12-28 01:41:46)
Offline
I sped starting a shell up with changing to zsh. Also the autocompletion itself is faster.
^
Offline