Fix prompt

This commit is contained in:
buffet 2021-10-25 17:30:54 +00:00
parent 0ac7c52a27
commit 885b76b03a

View file

@ -31,8 +31,10 @@ __prompt() {
*) PS1='\[\e[31m\]' ;; *) PS1='\[\e[31m\]' ;;
esac esac
if [[ "$PWD" = "$HOME" ]]; then if [[ "$PWD" == "$HOME" ]]; then
PS1+='~' PS1+='~'
elif [[ "$PWD" == / ]]; then
PS1+=/
else else
PS1+="${PWD##*/}" PS1+="${PWD##*/}"
fi fi