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

Re: cursor position



On May 17, 10:47am, Edi Cahyadi wrote:
} Subject: cursor position
}
} Any body knows how to set an option such that when we go to the history
} list, the cursor is on the first character, not the last, of the line?

There isn't any such option, but there are several things you can do.  The
easiest is probably:

eval "$(bindkey -L | sed -ne s/up-line-or-history/beginning-of-line-hist/p)"

(Note, that won't work directly in 3.0.x because there's no -L option to
bindkey.)  You could also do something with "bindkey -s" ,or create your
own zle widget to replace up-line-or-history.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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