[wplug] smart command history?
Brandon Kuczenski
brandon at 301south.net
Tue Feb 24 18:02:52 EST 2004
So everyone knows one can select from previously-entered commands by
pressing up-arrow in a terminal. And tab-completion can help one fill out
a partially typed command. I was wondering if anyone was familiar with
'Matlab-style' command history for a *sh terminal. The way Matlab does it
is: if you have a partially typed command, then up-arrow will only fill-in
previously-entered commands that match the partially-typed string. For
example, if one had entered a command like 'chmod a-w *' and then entered
some other commands, navigating around and such, then if the one entered
'ch' and pressed up-arrow, it would cycle through only commands beginning
with 'ch', rather than all recently-entered commands.
One can imagine how this would be useful.
I could imagine a way to do this by searching through the .bash_history
file, but I think that file only gets written to on logout. Besides, I
wouldn't know how to hook it into bash.
-Brandon
More information about the wplug
mailing list