Skip to content

Commit

Permalink
Add git_branch_space and git_dirty_space
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathandandries committed Aug 16, 2018
1 parent 75781b7 commit 2af42d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ find_git_branch() {
branch='detached*'
fi
git_branch="($branch)"
git_branch_space=" "
else
git_branch=""
git_branch_space=""
fi
}

find_git_dirty() {
local status=$(git status --porcelain 2> /dev/null)
if [[ "$status" != "" ]]; then
git_dirty='*'
git_dirty_space=" "
else
git_dirty=''
git_dirty_space=""
fi
}

Expand Down

0 comments on commit 2af42d7

Please sign in to comment.