让ubuntu bash像git bash一样,命令换行,末尾显示分支和分支状态。
vim ~/.bashrc
if [[ -n "$(command -v getent)" ]] && id -G | grep -q "$(getent group 'S-1-16-12288' | cut -d: -f2)"
then _ps1_symbol='\[\e[1m\]#\[\e[0m\]'
else _ps1_symbol='\$'
fi
export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]$(__git_ps1)\n'"${_ps1_symbol}"' '