我能够在shell提示符中显示git分支名称.但每当我使用屏幕时,我都会得到
bash: parse_git_branch: command not found
Run Code Online (Sandbox Code Playgroud)
和git分支没有显示.请帮我在屏幕会议中得到这个.
我在.bash_profile中有以下内容.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/
}
export PS1="[\W\$(parse_git_branch)]$ "
Run Code Online (Sandbox Code Playgroud)
我没有 .git-completion.bash
系统规格: