[zsh] Put the history number at the beginning of the top line of the prompt

This commit is contained in:
Eryn Wells 2024-03-07 10:47:15 -08:00
parent 75d455aa90
commit d92641ae85

View file

@ -42,7 +42,7 @@ function prompt_loquacious_setup
zstyle ':vcs_info:git:loquacious_precmd:*' formats '(%F{blue}%b%f)'
zstyle ':vcs_info:git-svn:loquacious_precmd:*' formats '(%F{blue}%b%f)'
PS1='${PS1_NAME}${PS1_HOST}${PS1_CWD}${PS1_REPO}${PS1_BRANCH}${PS1_TIME}${PS1_STATUS}${PS1_ZLE_MODE}
PS1='${PS1_STATUS}${PS1_NAME}${PS1_HOST}${PS1_CWD}${PS1_REPO}${PS1_BRANCH}${PS1_TIME}${PS1_ZLE_MODE}
$PS1_LINE'
zle -N zle-keymap-select on_keymap_select
@ -83,10 +83,9 @@ function set_repo_name
function set_prompt_info
{
PS1_TIME="at %*"
PS1_HISTORY="%F{green}%H%f"
PS1_NAME="%F{magenta}%n%f "
PS1_CWD="in %F{green}%~%f "
PS1_STATUS=" %(?..%F{red}!%f)"
PS1_STATUS="[%(?.%F{blue}%!%f.%F{red}%!%f)] "
if [[ -n "$SSH_CONNECTION" && "$TERM_PROGRAM" != "tmux" ]]; then
PS1_HOST="at %F{red}%m%f "
@ -109,7 +108,7 @@ function set_prompt_info
fi
# Show background job count if any exist.
RPS1="[%!%(1j.,%F{magenta}%j%f.)]"
RPS1="%(1j.[%F{magenta}%j%f].)"
PS1_LINE='%(!.%F{red}.%F{default})%#%f '
}