2021年1月21日星期四

break bash: parse_git_branch: command not found

Installed zsh and later on I try to uninstall but it was not installing so I deleted the folders/files manually and after that I started seeing the issues, so everytime I type command in the terminal I see bash: parse_git_branch: command not found

I check it shows that I have default shell is bash (going to system pref->users-)

What do I need to do to bring back the bash? looks like I screwed up the shell, is that possible if I can uninstall and install fresh bash?

I did brew uninstall bash or brew install bash

I get this message:

brew uninstall bash

Error: Running Homebrew as root is extremely dangerous and no longer supported.  As Homebrew does not drop privileges on installation you would be giving all  build scripts full access to your system.  bash: parse_git_branch: command not found  

this is how my .bash_profile looks like

parse_git_branch() {      git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' }    export PS1="\u@\h \[\033[32m\]\w - \$(parse_git_branch)\[\033[00m\] $ "  
https://stackoverflow.com/questions/65839161/break-bash-parse-git-branch-command-not-found January 22, 2021 at 12:06PM

没有评论:

发表评论