diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-09-19 11:24:28 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-09-19 11:29:46 +0300 |
commit | 5851985b5659e466f1c3457024b48df8dec9be4c (patch) | |
tree | 20d1f662b2c2a2b511ec14e5d2e640508e79c5d0 /git-prompt.sh | |
parent | fixed: git hides git-* command away from $PATH (diff) | |
download | git-prompt-5851985b5659e466f1c3457024b48df8dec9be4c.tar.gz git-prompt-5851985b5659e466f1c3457024b48df8dec9be4c.tar.bz2 git-prompt-5851985b5659e466f1c3457024b48df8dec9be4c.zip |
don't show files from parent dir
Diffstat (limited to 'git-prompt.sh')
-rw-r--r-- | git-prompt.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index 2517f5f..077866e 100644 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -33,9 +33,9 @@ op_vcs_color=MAGENTA detached_vcs_color=RED - max_untracked=6 - max_modified=6 - max_added=6 + max_untracked=2 + max_modified=4 + max_added=4 ##################################################################### post config @@ -289,19 +289,19 @@ parse_git_dir() { s/^# Initial commit/init=init/p /^# Untracked files:/,/^[^#]/{ s/^# Untracked files:/untracked=untracked;/p - s/^# /untracked_files[${#untracked_files[@]}+1]=/p + s/^# \([^.]\)/untracked_files[${#untracked_files[@]}+1]=\1/p } /^# Changed but not updated:/,/^# [A-Z]/ { s/^# Changed but not updated:/modified=modified;/p - s/^# modified: /modified_files[${#modified_files[@]}+1]=/p - s/^# unmerged: /modified_files[${#modified_files[@]}+1]=/p + s/^# modified: \([^.]\)/modified_files[${#modified_files[@]}+1]=\1/p + s/^# unmerged: \([^.]\)/modified_files[${#modified_files[@]}+1]=\1/p } /^# Changes to be committed:/,/^# [A-Z]/ { s/^# Changes to be committed:/added=added;/p - s/^# modified: /added_files[${#added_files[@]}+1]=/p - s/^# new file: */added_files[${#added_files[@]}+1]=/p - s/^# renamed:[^>]*> /added_files[${#added_files[@]}+1]=/p - s/^# copied:[^>]*> /added_files[${#added_files[@]}+1]=/p + s/^# \([^.]\)modified: /added_files[${#added_files[@]}+1]=\1/p + s/^# \([^.]\)new file: */added_files[${#added_files[@]}+1]=\1/p + s/^# \([^.]\)renamed:[^>]*> /added_files[${#added_files[@]}+1]=\1/p + s/^# \([^.]\)copied:[^>]*> /added_files[${#added_files[@]}+1]=\1/p } ' ` |