From 97aac46df03bacefbf0d364fc3970e6e55a1a3b2 Mon Sep 17 00:00:00 2001 From: masterzu Date: Wed, 30 Jan 2019 13:05:44 +0100 Subject: [PATCH] bash prompt: BUGFIX prompt with on $PWD --- .bash_prompt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bash_prompt b/.bash_prompt index fd0f09c..84f6586 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -61,7 +61,7 @@ function _my_parse_git_branch { function short_path { # print first two letters of the path + last dir local home=/ho/patrick - echo $(dirname $1 | \ + echo $(dirname "$1" | \ sed -e "s;$HOME;~;" | \ sed -e "s;\(/[^/]\{1,2\}\)[^/]*;\1;g")/$(basename "$1") | \ sed -e "s;$home;~;" @@ -102,7 +102,7 @@ function prompt_func() { # PWD # prompt="${prompt} \w" - prompt="${prompt} $(short_path $PWD)" + prompt="${prompt} $(short_path "$PWD")" # if test $previous_return_value -eq 0 # then