From ac1aececaa34759a7a58236005183edf766870df Mon Sep 17 00:00:00 2001 From: Emile Date: Mon, 25 Mar 2024 15:36:06 +0100 Subject: display the time a command was executed in the prompt --- nix/hosts/caladan/session_variables.zsh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'nix/hosts') diff --git a/nix/hosts/caladan/session_variables.zsh b/nix/hosts/caladan/session_variables.zsh index 863f31c..b056a86 100644 --- a/nix/hosts/caladan/session_variables.zsh +++ b/nix/hosts/caladan/session_variables.zsh @@ -1,5 +1,16 @@ export PROMPT="; " # minimal prompt -export RPROMPT="%F{green}%/%F{reset}" + +# right side prompt +# - path +# time of last command executed +#export RPROMPT="%F{green}%/%F{reset}" +export RPROMPT="%F{green}%/%F{reset} %D{%K:%M:%S}" + +# reset the prompt every second, so we get the time the command was executed +# in the rprompt +TMOUT=1 +TRAPALRM() { zle reset-prompt } + export PROMPT_EOL_MARK="%" # hide EOL sign ('%') export EDITOR="hx" -- cgit 1.4.1