I've installed bash 4 and bash-completions@2 with Homebrew following all kinds of guides I found online. However, when I open a new terminal it just hangs. By placing some echo
s in my .bash_profile
it seems to be hanging on loading the completions.
My .bash_profile
:
# Import all files
for DOTFILE in ~/.{aliases,env,functions,path,prompt,extra}
do
[ -r "$DOTFILE" ] && [ -f "$DOTFILE" ] && source "$DOTFILE"
done
unset DOTFILE;
echo $BASH_VERSION
printf "Loading bash completions..."
if [ -f /usr/local/share/bash-completion/bash_completion ]; then
. /usr/local/share/bash-completion/bash_completion
fi
printf "done!"
if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then
GIT_PROMPT_THEME=Default
source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh"
fi
(the DOTFILE
stuff is loading my dotfiles)
When I open a new terminal with the above .bash_profile
I get this output:
Last login: Fri Jun 23 10:43:12 on ttys001
4.4.12(1)-release
Loading bash completions...
Running brew doctor
doesn't say anything about bash completions.
What can I do to get this working?
UPDATE
There were a bunch of rustc
processes taking up a lot of CPU. Most likely related.
Best Answer
It turns out the problem was with
rustc
. Upgrading the package withbrew upgrade rust
fixed it.My current Rust version is now 1.18.0.