From d490baa28de27df5758391e7de3f8e22ee83285b Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Thu, 17 Oct 2024 00:42:46 -0700 Subject: [PATCH] Add execution time to transient prompt Also remove "VBE" from the transient prompt code I yoinked. --- .zshrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.zshrc b/.zshrc index c68604d..aaaa248 100644 --- a/.zshrc +++ b/.zshrc @@ -37,8 +37,8 @@ _prompt () { local retval=$? # Echo compact prompt - if (( $_vbe_prompt_compact )); then - echo '\e[32m\e[0m ' + if (( $_prompt_compact )); then + echo "\e[1;30;42m `date +%H:%M:%S` \e[32;40m\e[0m " return fi @@ -58,15 +58,15 @@ _zle-line-init() { # If we received EOT, we exit the shell if [[ $ret == 0 && $KEYS == $'\4' ]]; then - _vbe_prompt_compact=1 + _prompt_compact=1 zle .reset-prompt exit fi # Line edition is over. Shorten the current prompt. - _vbe_prompt_compact=1 + _prompt_compact=1 zle .reset-prompt - unset _vbe_prompt_compact + unset _prompt_compact if (( ret )); then # Ctrl-C