bash: bugfix prompt

This commit is contained in:
masterzu 2019-01-22 15:30:50 +01:00
parent 4d61d5b928
commit ce54e31b28
1 changed files with 5 additions and 1 deletions

View File

@ -60,7 +60,11 @@ function _my_parse_git_branch {
function short_path { function short_path {
# print first two letters of the path + last dir # 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() { function prompt_func() {