diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2016-02-20 14:11:09 +0200 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2016-02-20 14:11:09 +0200 |
commit | 689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb (patch) | |
tree | 809e6c358b647eed67fa23845ea0be4db6eb0f3d /git-prompt.sh | |
parent | fix: current directory display, was not abbrivated at home dir (diff) | |
parent | Merge pull request #44 from maruel/fix_home (diff) | |
download | git-prompt-689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb.tar.gz git-prompt-689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb.tar.bz2 git-prompt-689cbbe4b4ae0f4cdf7c247d13982d589fdc54eb.zip |
Merge branch 'master' of github.com:lvv/git-prompt
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-x | git-prompt.sh | 10 |
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) |