Add execution time to transient prompt
Also remove "VBE" from the transient prompt code I yoinked.
This commit is contained in:
parent
ade2e247fa
commit
d490baa28d
1 changed files with 5 additions and 5 deletions
10
.zshrc
10
.zshrc
|
@ -37,8 +37,8 @@ _prompt () {
|
||||||
local retval=$?
|
local retval=$?
|
||||||
|
|
||||||
# Echo compact prompt
|
# Echo compact prompt
|
||||||
if (( $_vbe_prompt_compact )); then
|
if (( $_prompt_compact )); then
|
||||||
echo '\e[32m\e[0m '
|
echo "\e[1;30;42m `date +%H:%M:%S` \e[32;40m\e[0m "
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -58,15 +58,15 @@ _zle-line-init() {
|
||||||
|
|
||||||
# If we received EOT, we exit the shell
|
# If we received EOT, we exit the shell
|
||||||
if [[ $ret == 0 && $KEYS == $'\4' ]]; then
|
if [[ $ret == 0 && $KEYS == $'\4' ]]; then
|
||||||
_vbe_prompt_compact=1
|
_prompt_compact=1
|
||||||
zle .reset-prompt
|
zle .reset-prompt
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Line edition is over. Shorten the current prompt.
|
# Line edition is over. Shorten the current prompt.
|
||||||
_vbe_prompt_compact=1
|
_prompt_compact=1
|
||||||
zle .reset-prompt
|
zle .reset-prompt
|
||||||
unset _vbe_prompt_compact
|
unset _prompt_compact
|
||||||
|
|
||||||
if (( ret )); then
|
if (( ret )); then
|
||||||
# Ctrl-C
|
# Ctrl-C
|
||||||
|
|
Loading…
Add table
Reference in a new issue