fix custom _git_ps1 bug

This commit is contained in:
Nachuan Tang
2022-07-25 17:18:08 -04:00
parent 335697de72
commit 8af29c97c1
+1 -1
View File
@@ -6,7 +6,7 @@ if [[ $(type -t foo) != function ]]; then
local branch=`git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/\1/'`
if [ $? ]; then
if [ -n "$branch" ]; then
status=`git status 2>/dev/null`
local stage_info="not staged for commit"
local commit_info="Changes to be committed"