Fix prompt
This commit is contained in:
parent
0ac7c52a27
commit
885b76b03a
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue