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

Ability to set HISTNO to a certain position from within zshrc

In certain situations when starting a new shell, I have an automated way to
determine a likely set of commands I will need to run and the order.   So, I
prime my history with these commands from my .zshrc using "print -s".

Now I find that I would also like to have my command line primed with one of
these lines, such that HISTNO is pointing to that line in the primed command
history.  I want to be able to use accept-line-and-down-history (or similar
widget) to allow me to quickly run through this list of commands if everything
goes smoothly.

Is there a way to start from a point in the primed history from my .zshrc?  It
seems like you have to be within a zle widget to modify HISTNO.  (HISTNO is
read only, but can be modified indirectly through zle widgets that change the
history position.)

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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