removed stray \ before /
This commit is contained in:
parent
ad308ed1c4
commit
b337d6d0f9
@ -129,7 +129,7 @@ if [ "$d" = "$PWD" ]; then
|
|||||||
dir=""
|
dir=""
|
||||||
elif grep -q "\.\.\.$" <<<"$d"; then
|
elif grep -q "\.\.\.$" <<<"$d"; then
|
||||||
dir="$(sed -e "s:.*\(/[!/]*\):\1:" <<< $PWD)"
|
dir="$(sed -e "s:.*\(/[!/]*\):\1:" <<< $PWD)"
|
||||||
elif grep -q "\/\.\.\.\/" <<< "$d"; then
|
elif grep -q "/\.\.\./" <<< "$d"; then
|
||||||
dir=""
|
dir=""
|
||||||
else
|
else
|
||||||
dir="$(sed -e "s/^$(sed -e "s:/:\\\/:g" <<<"$d")//" <<< $PWD)"
|
dir="$(sed -e "s/^$(sed -e "s:/:\\\/:g" <<<"$d")//" <<< $PWD)"
|
||||||
@ -144,7 +144,7 @@ ps1_write() {
|
|||||||
ret=$?
|
ret=$?
|
||||||
if [ -w "$PWD" ]; then
|
if [ -w "$PWD" ]; then
|
||||||
echo -e "$ON_COLOR"
|
echo -e "$ON_COLOR"
|
||||||
else
|
else
|
||||||
echo -e "$OFF_COLOR"
|
echo -e "$OFF_COLOR"
|
||||||
fi
|
fi
|
||||||
return $ret
|
return $ret
|
||||||
@ -202,7 +202,7 @@ else
|
|||||||
PS1dir='\[$(ps1_pre_color)\]$(ps1_pre)\[$(ps1_dir_color)\]$(ps1_dir $(ps1_pre))'
|
PS1dir='\[$(ps1_pre_color)\]$(ps1_pre)\[$(ps1_dir_color)\]$(ps1_dir $(ps1_pre))'
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
PS1git='$(__git_ps1 " (%s)")'
|
PS1git='$(__git_ps1 " (%s)")'
|
||||||
export PS1="${PS1pre}${PS1U}${PS1H} ${PS1dir}${ON_COLOR}${PS1git} ${PS1ret}${PS1P}"
|
export PS1="${PS1pre}${PS1U}${PS1H} ${PS1dir}\[${ON_COLOR}\]${PS1git} ${PS1ret}${PS1P}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user