From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4481 invoked by alias); 2 Jun 2011 04:27:28 -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: 16077 Received: (qmail 5617 invoked from network); 2 Jun 2011 04:27:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,TVD_RCVD_IP autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at dailyvoid.com designates 75.98.162.166 as permitted sender) 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; Message-ID: <4DE7111F.2010207@dailyvoid.com> Date: Wed, 01 Jun 2011 23:27:11 -0500 From: Michael Grubb User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Bart Schaefer CC: zsh-users@zsh.org Subject: Re: Multiline prompts and vi editing mode References: <4DE6BD21.2070209@dailyvoid.com> <110601193949.ZM14360@torch.brasslantern.com> In-Reply-To: <110601193949.ZM14360@torch.brasslantern.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s24.a2hosting.com X-AntiAbuse: Original Domain - zsh.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dailyvoid.com X-Source: X-Source-Args: X-Source-Dir: 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.