Add current time to prompt
This commit is contained in:
parent
7dd5e99734
commit
4a6c728dcb
|
@ -203,6 +203,10 @@ prompt_status() {
|
||||||
#[[ -n "$symbols" ]] && prompt_segment "$symbols"
|
#[[ -n "$symbols" ]] && prompt_segment "$symbols"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prompt_time() {
|
||||||
|
prompt_segment background default $(date "+%H:%M:%S")
|
||||||
|
}
|
||||||
|
|
||||||
## Main prompt
|
## Main prompt
|
||||||
build_prompt() {
|
build_prompt() {
|
||||||
#RETVAL=$?
|
#RETVAL=$?
|
||||||
|
@ -220,6 +224,7 @@ build_rprompt() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
prompt_status
|
prompt_status
|
||||||
prompt_endr
|
prompt_endr
|
||||||
|
prompt_time
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT='%{%f%b%k%}$(build_prompt) '
|
PROMPT='%{%f%b%k%}$(build_prompt) '
|
||||||
|
|
Loading…
Reference in New Issue