Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Recently changed behavior with moving between CTRL-R history search to vi mode
- X-seq: zsh-users 21678
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Recently changed behavior with moving between CTRL-R history search to vi mode
- Date: Thu, 16 Jun 2016 13:18:28 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=zSy9eGs8CGXnZDExwLOXdGLGTxko1nSsxSjry5gYYs0=; b=NrkcmOq+XVpQh0OI3Ebw7geAbk9W1QDkpMUBjjiyWRMQcb0swxdaiF2tge9cpnBfmi Bq2wQbTTr2IRdPMFox2VsYRIvtJm0oPZJ0IGinO3/nHXtinYwzk1Dmh9jWwvJueA+npv 5l6tTQf+cNRqzl73h7Ntm/ieIUXvd9ut78xBpSX1QDuxWFGQ7zz46rdXCSRdyAJ1xYfr 2s2wMt38xYM3zofZJ9gdAg1Fiw0LJIMSeP5o23GrQ8R0kRujNGRHWS5pmZEaNhtAUhs9 nX/O5caot9wvC8YKb5HsJo52g02E3KjPT4TI6Jag6vKbqCjE+J3A3UKPYEd0z+5eOedF 6IoQ==
- In-reply-to: <CACb5P-T30bV5R93Mw-esFJPDTFKLyK8Bs8zXncoedZQ8RGsVRA@mail.gmail.com>
- 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
- References: <CACb5P-T30bV5R93Mw-esFJPDTFKLyK8Bs8zXncoedZQ8RGsVRA@mail.gmail.com>
On Jun 15, 4:59pm, Cory Klein wrote:
}
} 1. CTRL-R
} 2. search for command
} 3. ESC to end history search, placing result into command prompt
} 4. ESC again to enter vi mode
} 5. w/l/other vi movement key
}
} However, recently I'm seeing that in some cases my shell is combining
} the ESC from 4 with the movement key from 5
This is the right place to ask, but I'm not able to reproduce a problem.
This bit --
} ESC-l => insert "ls" in the current cursor position and execute the
} command immediately (huh?)
-- makes me believe that some other bindings are getting involved.
Try this:
PS1="%v |$PS1"
zle-keymap-select() { psvar=("$1 -> $KEYMAP"); zle reset-prompt }
zle -N zle-keymap-select
This should cause your prompt to look like e.g.
main -> vicmd |torch%
after you hit the first ESC. If that's not what it looks like, that is
if it says something other than "vicmd" to the right of the ->, then
whatever it does say will be a clue.
(If you're already using psvar / %v for some other prompt configuration,
there are other ways to display the same information.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author