mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
working on return status
This commit is contained in:
parent
d78373cdbd
commit
d9bfce94f4
1 changed files with 7 additions and 1 deletions
|
@ -179,7 +179,7 @@ prompt_status() {
|
||||||
rprompt_status() {
|
rprompt_status() {
|
||||||
local symbols
|
local symbols
|
||||||
symbols=()
|
symbols=()
|
||||||
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" || symbols+="%{%F{red}%}y"
|
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" || symbols+="%{%F{green}%}✓"
|
||||||
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
|
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
|
||||||
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
|
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
|
||||||
|
|
||||||
|
@ -191,6 +191,11 @@ prompt_time() {
|
||||||
right_prompt_segment white black '%D{%H:%M:%S} '
|
right_prompt_segment white black '%D{%H:%M:%S} '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Command number (in current history)
|
||||||
|
prompt_history() {
|
||||||
|
right_prompt_segment blue black '%h'
|
||||||
|
}
|
||||||
|
|
||||||
# Ruby Version Manager information
|
# Ruby Version Manager information
|
||||||
prompt_rvm() {
|
prompt_rvm() {
|
||||||
local rvm_prompt
|
local rvm_prompt
|
||||||
|
@ -215,6 +220,7 @@ build_left_prompt() {
|
||||||
build_right_prompt() {
|
build_right_prompt() {
|
||||||
#prompt_rvm
|
#prompt_rvm
|
||||||
rprompt_status
|
rprompt_status
|
||||||
|
prompt_history
|
||||||
prompt_time
|
prompt_time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue