summaryrefslogtreecommitdiff
path: root/git-prompt.sh
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2009-07-11 16:08:46 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2009-07-11 16:08:46 +0300
commit933b0bbc3dc0b147f77e9916fcbe5d4c68e0ee0c (patch)
treec4335421ed028bc5f5839f67e0c94118e287fd1c /git-prompt.sh
parentfixed: broken with retab parse_git_status(), rename: trunkated_* --> elipses_* (diff)
downloadgit-prompt-933b0bbc3dc0b147f77e9916fcbe5d4c68e0ee0c.tar.gz
git-prompt-933b0bbc3dc0b147f77e9916fcbe5d4c68e0ee0c.tar.bz2
git-prompt-933b0bbc3dc0b147f77e9916fcbe5d4c68e0ee0c.zip
don't show all files state in subdir, only show shubdir itself
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-xgit-prompt.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index d3e8ec4..c239637 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -380,15 +380,15 @@ parse_git_status() {
/^# Untracked files:/,/^[^#]/{
s/^# Untracked files:/untracked=untracked;/p
- s/^# \(.*\)/untracked_files[${#untracked_files[@]}+1]=\\"\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: \.\./: SKIP/
- s/^# modified: \(.*\)/modified_files[${#modified_files[@]}+1]=\"\1\"/p
+ s/^# modified: \([^/]*\/\?\).*/modified_files[${#modified_files[@]}+1]=\"\1\"/p
s/^# unmerged: \.\./: SKIP/
- s/^# unmerged: \(.*\)/modified_files[${#modified_files[@]}+1]=\"\1\"/p
+ s/^# unmerged: \([^/]*\/\?\).*/modified_files[${#modified_files[@]}+1]=\"\1\"/p
}
/^# Changes to be committed:/,/^# [A-Z]/ {
@@ -399,10 +399,10 @@ parse_git_status() {
s/^# renamed:[^>]*> \.\./: SKIP/
s/^# copied:[^>]*> \.\./: SKIP/
- 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
+ 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
}
'
`