[TriLUG] history
Chris MacLeod
stick at miscellaneous.net
Mon Feb 23 13:35:05 EST 2004
the bash built-in 'fc' is also very helpful.
fc [regex] will open the last command to match regex in $EDITOR then
once you save-quit that buffer it will run said command.
fc -l will also list history entries so something like
fc -l -10 will list the last 10 history entries, while
fc 0 -10 will bring up $EDITOR with the last 10 entries in the buffer
(and then run all 10 if you want)
there is also some replacement that you can do with -s.
Stick
On Mon, Feb 23, 2004 at 12:16:02PM -0500, Stephen Hoffman wrote:
> Got a question about functionality that may or may not exist, but I
> certainly don't want to start writing programs that already exist...
>
> I want to be able to use the commands out of "history". When I type a
> long drawn out command one time I want to be able to call that same
> command much like bash does with tab completion or to be able to
> re-execute entry #100 but don't really want to alias it. This may seem
> lazy, but I am not one for jumping from keyboard to mouse back to
> keyboard...I want to use one or the other...and some systems don't even
> have a mouse.
>
> Does this functionality exist under another name or exist at all? RTFM
> produced little on "history", Where else can I look?
>
> TIA,
> Steve
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
>
--
http://stick.miscellaneous.net
Chris MacLeod
More information about the TriLUG
mailing list