From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12467 invoked from network); 29 Jun 1999 15:29:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Jun 1999 15:29:17 -0000 Received: (qmail 7530 invoked by alias); 29 Jun 1999 15:29:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6927 Received: (qmail 7523 invoked from network); 29 Jun 1999 15:29:08 -0000 From: "Bart Schaefer" Message-Id: <990629152431.ZM21113@candle.brasslantern.com> Date: Tue, 29 Jun 1999 15:24:31 +0000 In-Reply-To: <001901bec230$a7675b60$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "RE: PS1 or PS2" (Jun 29, 5:09pm) References: <001901bec230$a7675b60$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , "Sven Wischnowsky" , Subject: Re: PS1 or PS2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 29, 5:09pm, Andrej Borsenkow wrote: } Subject: RE: PS1 or PS2 } } > } > It almost works ... } > } > bor@itsrm2:~%> _Fn-up-line-or-history () { } > function> [[ -n "$PREBUFFER" ]] && zle .push-line-or-edit } > function> zle .up-line-or-history } > function> } } } After zle .push-line-or-edit both BUFFER and PREBUFFER are empty. Are they } static values computed on the entry into widget or do they reflect real ZLE } buffers? I think they reflect real ZLE buffers. The "problem" is with the way that push-input/get-line (and consequently push-line-or-edit) are implemented: They do something similar to print -z "$BUFFER" BUFFER="" and then wait for zle_refresh() to come around and yank the buffer back. So if you're entirely inside a zle widget (or a bindkey -s), you can't do anything to the pushed input; it simply isn't there anymore until zsh has a chance to print a prompt again. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com