From ce54e31b2835f988ea58f9bd8b15e1d6a0cb9213 Mon Sep 17 00:00:00 2001 From: masterzu Date: Tue, 22 Jan 2019 15:30:50 +0100 Subject: [PATCH] bash: bugfix prompt --- .bash_prompt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.bash_prompt b/.bash_prompt index 57c0065..fd0f09c 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -60,7 +60,11 @@ 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) + local home=/ho/patrick + echo $(dirname $1 | \ + sed -e "s;$HOME;~;" | \ + sed -e "s;\(/[^/]\{1,2\}\)[^/]*;\1;g")/$(basename "$1") | \ + sed -e "s;$home;~;" } function prompt_func() {