summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2009-01-05 17:20:41 +0200
committerLeonid Volnitsky <Leonid@Volnitsky.com>2009-01-05 17:20:41 +0200
commit9c711fd518346114583765f3f1cbba7c227d9003 (patch)
tree5a96ffca599d037171b3a340ceb8ccfe0a14253e
parentsvn module now can display file status too (diff)
downloadgit-prompt-9c711fd518346114583765f3f1cbba7c227d9003.tar.gz
git-prompt-9c711fd518346114583765f3f1cbba7c227d9003.tar.bz2
git-prompt-9c711fd518346114583765f3f1cbba7c227d9003.zip
fixed: file from parent dir are shown
-rw-r--r--README3
-rw-r--r--git-prompt.sh14
2 files changed, 8 insertions, 9 deletions
diff --git a/README b/README
index 4d114cc..78ade00 100644
--- a/README
+++ b/README
@@ -30,8 +30,6 @@ DEPENDENCY
TODO
- - TO FIX: when file list is too long, git-prompt truncates it. Sometimes this truncation can be on color escape sequence.
- (fixed fot GIT, TODO for SVN)
- external config at /etc/git-prompt.conf and ~/.git-prompt.conf
- new mail (howto at: http://kikhome.net/?p=11)
- ^Z subshell indicator
@@ -40,6 +38,7 @@ TODO
- make module (to show generated, stale files)
- How detect current merge? (current method through .git/MERGE_HEAD not always works)
DONE
+ - TO FIX: when file list is too long, git-prompt truncates it. Sometimes this truncation can be on color escape sequence.
- limit number of files displayed
diff --git a/git-prompt.sh b/git-prompt.sh
index 070eead..7603a4b 100644
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -292,19 +292,19 @@ parse_git_dir() {
s/^# Initial commit/init=init/p
/^# 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: \([^.]*\)/modified_files[${#modified_files[@]}+1]=\"\1\"/p
- s/^# unmerged: \([^.]*\)/modified_files[${#modified_files[@]}+1]=\"\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]=\"\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
}
'
`