24 Jul 16:17
History expansion to rerun multiple contiguous commands?
From: Mike Fletcher <fletch <at> phydeaux.org>
Subject: History expansion to rerun multiple contiguous commands?
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-07-24 14:21:19 GMT
Expires: This article expires on 2008-08-07
Subject: History expansion to rerun multiple contiguous commands?
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-07-24 14:21:19 GMT
Expires: This article expires on 2008-08-07
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.
RSS Feed