Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Duplicating TRANSIENT_RPROMPT for left PROPMT?
- X-seq: zsh-users 18052
- From: Jesse Hathaway <jesse@xxxxxxxxxxxxxxx>
- To: ZSH Users Mailing List <zsh-users@xxxxxxx>, Jesse Hathaway <jesse@xxxxxxxxxxxxxxx>
- Subject: Duplicating TRANSIENT_RPROMPT for left PROPMT?
- Date: Tue, 22 Oct 2013 16:22:08 -0500
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
When I enter a command the bottom part of my zsh PROMPT is not cleared
~
→ echo a
a- INSERT --
~
→
-- INSERT --
The unusual part of my prompt is the vi mode at the bottom of my screen.
Does anyone have thoughts on the best way to clear the prompt before the
command is entered?
Here is my zshrc:
bindkey -v
setopt prompt_subst
vim_ins_mode="-- INSERT --"
vim_cmd_mode=""
vim_mode=$vim_ins_mode
terminfo_down_sc=$terminfo[cud1]$terminfo[cud1]$terminfo[cuu1]$terminfo[cuu1]$terminfo[sc]$terminfo[cud1]$terminfo[cud1]
function zle-keymap-select {
vim_mode="${${KEYMAP/vicmd/${vim_cmd_mode}}/(main|viins)/${vim_ins_mode}}"
zle reset-prompt
}
zle -N zle-keymap-select
function zle-line-finish {
vim_mode=$vim_ins_mode
}
zle -N zle-line-finish
PS1='%{$terminfo_down_sc$vim_mode$terminfo[rc]%}%~
→ '
Thanks, Jesse
Messages sorted by:
Reverse Date,
Date,
Thread,
Author