From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29041 invoked by alias); 23 Oct 2013 13:48:20 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18056 Received: (qmail 26638 invoked from network); 23 Oct 2013 13:48:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131023064759.ZM9762@torch.brasslantern.com> Date: Wed, 23 Oct 2013 06:47:59 -0700 In-reply-to: Comments: In reply to Jesse Hathaway "Duplicating TRANSIENT_RPROMPT for left PROPMT?" (Oct 22, 4:22pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: ZSH Users Mailing List Subject: Re: Duplicating TRANSIENT_RPROMPT for left PROPMT? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 22, 4:22pm, Jesse Hathaway wrote: } } 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? The best solution to this is to NOT put the vi mode in the prompt, but instead use "zle -M" to display it. Simplest way is like this: PS1='%~ ' vim_ins_mode="-- INSERT --" vim_cmd_mode="" function zle-keymap-select { vim_mode="${${KEYMAP/vicmd/${vim_cmd_mode}}/(main|viins)/${vim_ins_mode}}" zle -M -- "$vim_mode" } zle -N zle-keymap-select zle -N zle-line-init zle-keymap-select Of course if you're already doing other stuff in zle-line-init you'll need to tweak this, e.g., call zle-keymap-select from zle-line-init. This and your original scheme both seem to suffer from the problem that any completion listing covers up the "mode message" and it doesn't return until you toggle through command/insert again.