diff options
author | Erich Eckner <git@eckner.net> | 2016-04-14 14:24:23 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-14 14:24:23 +0200 |
commit | 29c29d0e5730811cfda0cbfa64d0f5e2027d234e (patch) | |
tree | a4ea62fcab6eb730526d460f99aca059a4795cc4 | |
parent | 7668b1d44887fd0261b8ca5f5d9e3cbd43603905 (diff) | |
download | bash-git-prompt-29c29d0e5730811cfda0cbfa64d0f5e2027d234e.tar.xz |
prompt mit Farbe wird nun vsl. richtig zerlegtv0.5
-rwxr-xr-x[-rw-r--r--] | bash-git-prompt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash-git-prompt b/bash-git-prompt index 44bd8ea..8306481 100644..100755 --- 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" |