Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ your `PS1` variable, and make sure the variable value is defined with double
quotes. A set of color variables have also been set for you to use. For a list
of available colors check `colors.sh`.

If you would like to use a symbol other than '*' to indicate that the branch is
dirty, simply set the `dirtysmb` to whatever symbol you would like and export it.

## Updating

Expand Down
6 changes: 5 additions & 1 deletion prompt.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Users can set the dirtysymb env var in their .bash_profile, etc,
# or they can leave it unset and it will default to the '*'.
export dirtysymb=${dirtysymb:="*"};

find_git_branch() {
# Based on: http://stackoverflow.com/a/13003854/170413
local branch
Expand All @@ -14,7 +18,7 @@ find_git_branch() {
find_git_dirty() {
local status=$(git status --porcelain 2> /dev/null)
if [[ "$status" != "" ]]; then
git_dirty='*'
git_dirty=$dirtysymb
else
git_dirty=''
fi
Expand Down