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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ this article: [How to: Change / Setup bash custom prompt (PS1)][how-to]

[how-to]: http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html

If you don't want untracked files to be included in the "dirty" decision process,
set the variable `GIT_PROMPT_IGNORE_UNTRACKED` to any value.


### Suggested Prompts

Expand Down
2 changes: 1 addition & 1 deletion prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ find_git_branch() {
}

find_git_dirty() {
local status=$(git status --porcelain 2> /dev/null)
local status=$(git status --porcelain ${GIT_PROMPT_IGNORE_UNTRACKED:+--untracked-files=no} 2> /dev/null)
if [[ "$status" != "" ]]; then
git_dirty='*'
else
Expand Down