Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multiline prompts and vi editing mode
- X-seq: zsh-users 16077
- From: Michael Grubb <zsh@xxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Multiline prompts and vi editing mode
- Date: Wed, 01 Jun 2011 23:27:11 -0500
- Cc: zsh-users@xxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=dailyvoid.com; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Source:X-Source-Args:X-Source-Dir; b=HkA9sUpO9Lr3yoqt8Cy9csb4SWr9llerQH/wInQhyZxNcOSprSN+7Le5o8xZf63mL4rZYoafxdxABiIbI+Cz/jEaklFy8/jzN9CfdgoqXTbZJGhj2tFH++aCITehs3S2;
- In-reply-to: <110601193949.ZM14360@torch.brasslantern.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: <4DE6BD21.2070209@dailyvoid.com> <110601193949.ZM14360@torch.brasslantern.com>
On 6/1/11 9:39 PM, Bart Schaefer wrote:
> On Jun 1, 5:28pm, Michael Grubb wrote:
> } Subject: Multiline prompts and vi editing mode
> }
> } I've also been tinkering with some of the features from oh-my-zsh,
> } specifically some of the themes that feature multiline prompts. I have
> } noticed however that when hitting Esc to go into command mode that I'm
> } loosing the last line of output from the previous command.
>
> This probably means that there's something in the prompt that should be
> wrapped in %{ and %} but is not. Or it may mean that there's a newline
> wrapped in %{ and %} that should not be. Zsh generally deals quite well
> with multiline prompts.
>
Here is what my PROMPT/PS1 variable looks like:
PROMPT='%m %~
> '
I stripped out all the extra stuff (colors/etc) to make sure that nothing hinky
was happening between the %{ %}. Incidentally, if I do put the newline between
the %{ and %} I get the opposite problem, I get an extra 'top line' instead of
it eating a line.
> } Also in ksh I can use Esc-\ to invoke command completion, though that
> } doesn't seem to work with zsh, any tips on getting that configured
> } would also be very much appreciated.
>
> I suspect you want
>
> bindkey -M viins '\e\\' complete-word
>
> but I'm not certain because no ksh to which I have access behaves that
> way, at least not by default.
>
That bindkey did the trick, thanks! You may have to 'set -o vi ; set -o viraw' to get that to work.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author