Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
History in Non-Interactive Shells
- X-seq: zsh-users 11046
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: History in Non-Interactive Shells
- Date: Tue, 28 Nov 2006 12:21:05 -0500
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Is there any mechanism in zsh for accessing history in non-interactive
shells? An application I see for such a mechanism is in invoking the
shell from within an application when I only know a bit of the command.
For instance, when editing in vim a source file myapp.c that creates an
application myapp, it'd be great to be able to call the executable
without closing vim and instead calling ":!myapp" to find the last call
to myapp with the appropriate arguments. (I already make the executable
without closing vim.)
I could probably conjure up something by reversing the history file in
sed and grep'ing the result for the root name of the source file.
Either operation is probably a little expensive, but I thought I'd
check.
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author