summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-10-06 11:37:52 +0200
committerErich Eckner <git@eckner.net>2016-10-06 11:37:52 +0200
commitd352edbe2e33ccd9a436b8b2b57555b261fd0bd0 (patch)
tree960de6c44038c9639a03fe8cf6e8e986a3f37a48
parentd2091d4c77f066ae724a0c8f4c8f8d7dd36eac76 (diff)
downloadbash-git-prompt-d352edbe2e33ccd9a436b8b2b57555b261fd0bd0.tar.xz
export PS1Start/Ende
-rwxr-xr-xbash-git-prompt.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/bash-git-prompt.in b/bash-git-prompt.in
index b678bfb..e39ea81 100755
--- a/bash-git-prompt.in
+++ b/bash-git-prompt.in
@@ -7,11 +7,11 @@
[ -z "$PS1Start" ] && [ -z "$PS1Ende" ] &&
if echo "$PS1" | grep -q "\S"
then
- PS1Ende="$(echo "$PS1" | sed 's|^.*[^\]\(\\\?[$#>]\s*\([]\\[0-9m]\)*\s*\)$|\1|')"
- PS1Start="$(echo "$PS1" | sed 's|\\\?[$#>]\s*\([]\\[0-9m]\)*\s*$||')"
+ export PS1Ende="$(echo "$PS1" | sed 's|^.*[^\]\(\\\?[$#>]\s*\([]\\[0-9m]\)*\s*\)$|\1|')"
+ export PS1Start="$(echo "$PS1" | sed 's|\\\?[$#>]\s*\([]\\[0-9m]\)*\s*$||')"
else
- PS1Ende=""
- PS1Start="$PS1"
+ export PS1Ende=""
+ export PS1Start="$PS1"
fi
PS1="$PS1Start"