From 7824704b5a4c9e323aee270e5877572694174fda Mon Sep 17 00:00:00 2001 From: Yaroslav de la Peña Smirnov Date: Fri, 17 Apr 2026 14:52:29 +0300 Subject: zsh: update prompt Kinda got tired of my old prompt. Wanted to see the user@host on the left, plus kinda also wanted to have a timestamp. --- dotfiles/.config/zsh/.zshrc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'dotfiles/.config') diff --git a/dotfiles/.config/zsh/.zshrc b/dotfiles/.config/zsh/.zshrc index 5684477..327c685 100644 --- a/dotfiles/.config/zsh/.zshrc +++ b/dotfiles/.config/zsh/.zshrc @@ -7,12 +7,10 @@ precmd_functions+=( precmd_vcs_info ) setopt prompt_subst if [ "$USER" = "root" ]; then - # Make it so that we display root's user@host on the left and colored red so - # that it is quite clear that we are under root. - PROMPT=$'\n''%{%}%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{red}%n%f@%F{red}%m%f %F{green}→%f ' + # Display root's user colored red so that 'tis quite clear when we are root. + PROMPT=$'\n''%F{red}%n@%F{red}%m:%f%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{green}└%*#%f ' else - PROMPT=$'\n''%{%}%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{green}→%f ' - RPROMPT='%{%} %n%f@%F{red}%m%f' + PROMPT=$'\n''%{%}%n@%F{red}%m:%f%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{green}└%*→%f ' fi zstyle ':vcs_info:git:*' formats ' %b' -- cgit v1.3