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

Re: up-line and down-line without history



On 2011-06-01 09:45, Guido van Steen wrote:
Dear List,

I have been trying to find out how to "just" navigate through a multiline buffer.

I know the "up-line-or-history" and "down-line-or-history" widgets. It seems to me that the "up-line" and "down-line" parts of these widgets do exactly what I want. So the problem is that I would like to avoid the "or-history" part.

Are there a similar widgets that exclusively control the navigation of multiline buffers, i.e. without the side-effect of potentially navigating the history file?

Or could/should I create my own widgets based on "up-line-or-history" and "down-line-or-history", in which I just override the "or-history" part?

Curious,
there really does not seem to be a up/down-line (without history search) widget or functionality for multiline buffers that I could find.

While it should not be too hard to write one yourself
you might want to try the edit-command-line widget shipped with zsh.
might be more comfortable

i.e.:
autoload -U edit-command-line && zle -N edit-command-line && \
bindkey '\ee' edit-command-line

this way you can load and edit the current command line in your editor of choice by pressing ESC-e

regards,
Bernhard



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