MacOS – Terminal prompt does’t show on macOS Sierra

bashmacosterminal

Since I upgraded to Sierra, Terminal no longer loads my bash prompt, making it unusable. When I start it, it doesn't hang, but it stays looking like this:

I can enter text, but it doesn't do anything. It seems like the bash or tail command is hanging. I have also tried using the terminal window in Android Studio and that just shows a blank screen.

Any idea how I could fix this?

Best Answer

After some debugging I found out that the bash-autocompletion package for brew did cause this. It is clear that if you run $(brew --prefix)/etc/bash_completion the command does not terminate

As a wordaround, you can uninstall it with brew uninstall bash-autocompletion. I'd recommend to first update brew by running brew update && brew upgrade though.

Digging deeper it turned out the main problem here was the rust compiler. Running rustc --version pointed me to a segfault. I uninstalled it using /usr/local/lib/rustlib/uninstall.sh, after which the bash autocompletion started to work again. Removing rust as described, and reinstalling it using brew (brew install rust) ensured everything worked again