diff options
author | Emile <git@emile.space> | 2024-03-25 15:36:06 +0100 |
---|---|---|
committer | Emile <git@emile.space> | 2024-03-25 15:36:06 +0100 |
commit | ac1aececaa34759a7a58236005183edf766870df (patch) | |
tree | 0b4d161db882d4f2d2d80bc981e0933e951b2f42 /nix | |
parent | c778cd98f42763fb7991f3d5238c077e8411c535 (diff) |
display the time a command was executed in the prompt
Diffstat (limited to 'nix')
-rw-r--r-- | nix/hosts/caladan/session_variables.zsh | 13 |
1 files changed, 12 insertions, 1 deletions
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" |