From 4d61d5b92863baf1506b8cfcd4c87d836122b505 Mon Sep 17 00:00:00 2001 From: masterzu Date: Fri, 18 Jan 2019 17:38:40 +0100 Subject: [PATCH] bash: bugfix: change $HOME to ~ now working --- .bash_prompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bash_prompt b/.bash_prompt index 5690516..57c0065 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -60,7 +60,7 @@ function _my_parse_git_branch { function short_path { # print first two letters of the path + last dir - echo $(dirname $1 | sed -e "s;$HOME;~;" | sed -e "s;\(/[^/]\{1,2\}\)[^/]*;\1;g")/$(basename $1) + echo $(dirname $1/ | sed -e "s;$HOME;~;" | sed -e "s;\(/[^/]\{1,2\}\)[^/]*;\1;g")/$(basename $1) } function prompt_func() {