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

History expansion to rerun multiple contiguous commands?



Is there a way to use bang notation to re-run a chunk of a shell's history? As an example I've got 4 commands numbered 123-126 in my history and I want to (in one swell foop) rerun all 4.

I know worst case I can manually type out "!123 ; !124 ; !125 ; !126" but that seems . . . inelegant.

I tried a couple of quick tricks building that expansion by hand and then passing it to eval but that doesn't want to seem to do the necessary history expansion.


Thanks in advance.



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