summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2016-02-20 14:11:09 +0200
committerLeonid Volnitsky <Leonid@Volnitsky.com>2016-02-20 14:11:09 +0200
commit689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb (patch)
tree809e6c358b647eed67fa23845ea0be4db6eb0f3d
parentfix: current directory display, was not abbrivated at home dir (diff)
parentMerge pull request #44 from maruel/fix_home (diff)
downloadgit-prompt-689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb.tar.gz
git-prompt-689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb.tar.bz2
git-prompt-689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb.zip
Merge branch 'master' of github.com:lvv/git-prompt
-rwxr-xr-xgit-prompt.sh10
1 files changed, 1 insertions, 9 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index cd41fbe..322164d 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -177,15 +177,7 @@ cwd_truncate() {
# arg1: max path lenght
# returns abbrivated $PWD in public "cwd" var
- if [[ $PWD == $HOME ]]; then
- cwd="~"
- return
- else
- cwd=$PWD
- fi
-
- cwd="${PWD/$HOME/~}" # substitute "~"
- return
+ cwd="${PWD/$HOME/\~}" # substitute "~"
case $1 in
full)