.profile: Use prompt flags instead of hacked together BS for PS1

This commit is contained in:
Salt 2020-09-16 11:36:15 -05:00
parent fbdbc6d3c0
commit 53d253d3e0

View File

@ -348,11 +348,7 @@ _ps1bash() {
;; ;;
esac esac
# Show the tilde instead of $HOME # Show the tilde instead of $HOME
if [ "${PWD#$HOME}" != "$PWD" ]; then cpwd='\w'
cpwd="~${PWD#$HOME}"
else
cpwd="$PWD"
fi
# Show read-only status in certain directories # Show read-only status in certain directories
if [ "$UID" = 0 ]; then if [ "$UID" = 0 ]; then
# Root gets the usual "#" prompt # Root gets the usual "#" prompt