diff --git a/zsh/.config/zsh/config.d/30_prompt.zsh b/zsh/.config/zsh/config.d/30_prompt.zsh index 57a43b5..bb6eb82 100644 --- a/zsh/.config/zsh/config.d/30_prompt.zsh +++ b/zsh/.config/zsh/config.d/30_prompt.zsh @@ -10,3 +10,7 @@ precmd_functions+="vcs_info" # Prompt shows hostname if connected to a remote or if root PROMPT="%B$([ -n "$is_remote" ] || [ "$EUID" = 0 ] && echo "%F{magenta}%m%f ")%F{$([ "$EUID" = 0 ] && echo "red" || echo "cyan")}%n%f %F{blue}%~%f%b \${vcs_info_msg_0_}%B%#%b " + +# The line before the prompt is used by RPROMPT for information about the previous command - leave space +NEWLINE=$'\n' +PROMPT="$NEWLINE$PROMPT" diff --git a/zsh/.config/zsh/config.d/30_rprompt.zsh b/zsh/.config/zsh/config.d/30_rprompt.zsh index 99dba83..61a55c9 100644 --- a/zsh/.config/zsh/config.d/30_rprompt.zsh +++ b/zsh/.config/zsh/config.d/30_rprompt.zsh @@ -38,6 +38,11 @@ function build_rprompt { exittime="$(print -P "$timeformat")" RPROMPT="$RPROMPT at $exittime" + # this is all info about the previous command, so put it up a line from the main prompt + lineup=$'\e[1A' + linedown=$'\e[1B' + RPROMPT="%{$lineup%}$RPROMPT%{$linedown%}" + # that's an RPROMPT! export RPROMPT