Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: up-line-or-search question



On Wed, 27 Feb 2002, Peter Stephenson wrote:

> The answer to the question Bart asked the first time round `how do I
> find out if I'm at PS2' is, unless I'm missing a subtlety, `[[ -n
> $PREBUFFER ]]'.

(Hand smacks forehead)

> It's not clear to me what you do in that case anyway.

My knee-jerk reaction was to say "never do history-beginning-search" but
on further though I can see why it might sometimes be wanted.

Personally, I'd do something like

	[[ -n $PREBUFFER ]] && zle .push-line-or-edit

which would be perfect if only it didn't beep.



Messages sorted by: Reverse Date, Date, Thread, Author