From 9c711fd518346114583765f3f1cbba7c227d9003 Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Mon, 5 Jan 2009 17:20:41 +0200 Subject: fixed: file from parent dir are shown --- README | 3 +-- git-prompt.sh | 14 +++++++------- 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 } ' ` -- cgit v1.2.3