## 14 thoughts on “What is your PS1?”

1. Perhaps it’s because when I’m at an actual prompt, I’m at home, not working, I find all the stuff about current directory, user, hostname, et cetera, just extraneous. So generally my prompt is just

PS1=’\$‘ If I need to know stuff, there’s always pwd, hostname, and whoami. 2. Adrian says: I do not claim any proper code in the following lines that I’ve had for ages… %cat load.zsh #!/bin/zsh declare -i Up=”uptime | awk -F: ‘{print$4}’ | cut -f1 -d’,’”

if [ $Up -ge 2 ] then echo ‘red’ exit else if [$Up -lt 1 ]
then
echo ‘green’
exit
else
echo ‘yellow’
exit
fi
fi

%cat prompt.zsh
colors

user_color=”cyan”
user_in_color=”white”
path_color=”green”
percent_color=”yellow”
date_color=”zsh ~/.zsh/load.zsh”

date_format=”%H:%M”

#start=”%U”
date=”%{$fg[$date_color]%}%D{$date_format}” user=”%{$fg[$user_color]%}[%{$fg[$user_in_color]%}%n%{$fg[$user_color]%}]” cpath=”%B%{$fg[$path_color]%}%~%b” percent=”%{$fg[$percent_color]%}%%” end=”%{$reset_color%}”

PS1=”$user$cpath $percent$end ”

RPS1=”$date$end”