-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprompt.zsh
26 lines (26 loc) · 963 Bytes
/
prompt.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
###############################################################################
# Prompts
###############################################################################
# secondary prompt, printed when the shell needs more information to
# complete a command.
PS2='`%_> '
# selection prompt used within a select loop.
PS3='?# '
# the execution trace prompt (setopt xtrace). default: '+%N:%i>'
PS4='+%N:%i:%_> '
if [ $UID != 0 ]; then
local prompt_user="${lgreen}%n${std}"
else
local prompt_user="${lred}%n${std}"
fi
local prompt_host="${lyellow}%m${std}"
local prompt_cwd="%B%40<..<%~%<<%b"
local prompt_time="${lblue}%D{%H:%M:%S}${std}"
local prompt_rv="%(?..${lred}%?${std} )"
if [ `which rosversion` ]; then
local prompt_rosversion=`rosversion -d`
else
local prompt_rosversion="N/A"
fi
PROMPT="${prompt_user}${lwhite}@${std}${prompt_host}<$PROFILE> ${prompt_cwd} %(!.#.$) "
RPROMPT="${prompt_rv}${prompt_time} ${lgreen}${prompt_rosversion}${std}"