From 29c29d0e5730811cfda0cbfa64d0f5e2027d234e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 14 Apr 2016 14:24:23 +0200 Subject: prompt mit Farbe wird nun vsl. richtig zerlegt --- bash-git-prompt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 bash-git-prompt diff --git a/bash-git-prompt b/bash-git-prompt old mode 100644 new mode 100755 index 44bd8ea..8306481 --- a/bash-git-prompt +++ b/bash-git-prompt @@ -7,8 +7,8 @@ set -o pipefail [ -z "$PS1Start" ] && [ -z "$PS1Ende" ] && if echo "$PS1" | grep -q "\S" then - PS1Ende="$(echo "$PS1" | sed "s|^.*[^\\]\(\\\\\?\S\s*\)\$|\1|")" - PS1Start="$(echo "$PS1" | sed "s|\\\\\?\S\s*\$||")" + PS1Ende="$(echo "$PS1" | sed 's|^.*[^\]\(\\\?[$#>]\s*\([]\\[0-9m]\)*\s*\)$|\1|')" + PS1Start="$(echo "$PS1" | sed 's|\\\?[$#>]\s*\([]\\[0-9m]\)*\s*$||')" else PS1Ende="" PS1Start="$PS1" -- cgit v1.2.3-70-g09d2