diff options
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) |