.profile: Change suffix assignment for PS1

This commit is contained in:
Salt 2018-10-07 00:04:00 -05:00
parent 0ba5a922de
commit 9813277aba

View File

@ -98,19 +98,19 @@ _ps1() {
hostname_prefix="${fg_bold}${fg_red}`hostname`${r}${fg_red}:"
fi
# Change $ color depending on shell
cashcolor="${fg_green}"
suffix="${fg_green}"
case $0 in
bash)
cashcolor="${fg_blue}"
suffix="${fg_blue}%%"
;;
ksh)
cashcolor="${fg_yellow}"
suffix="${fg_yellow}$"
;;
sh)
cashcolor="${fg_grey}"
suffix="${fg_grey}$"
;;
*)
cashcolor="${fg_green}"
suffix="${fg_green}$"
;;
esac
# Show the tilde instead of $HOME
@ -120,7 +120,7 @@ _ps1() {
if ! [ "$exitcode" = "0" ]; then
fail="${fg_bold}${fg_red}?"
fi
printf "[${hostname_prefix}${cpwd}${r}]${fail}${r}${cashcolor}\$${r} "
printf "[${hostname_prefix}${cpwd}${r}]${fail}${r}${suffix}${r} "
}
if ! [ "$ZSH_NAME" ]; then