[CLUE-Tech] vi form of command history editor in bash?

Jeffery Cann fabian at jefferycann.com
Tue Dec 18 21:34:16 MST 2001


As the resident vi (Village Idiot) of CLUE:

The vi bindings work the same as vi.  You are in edit mode generally, so to 
do commands you must escape edit mode.  So, the following commands require 
you to hit the <esc> key first:

k --  scroll backwards through command history
j -- scroll forwards through command history
/keyword  -- search command history for 'keyword'
 (then hit 'n' to find the next instance of keyword)

When you select a command from the history, you are still in command mode, so 
you have to re-enter edit mode to edit the command.  For example:

$ /bob  ---- search for 'bob'

This finds the first entry:

perl search.cgi bob 

Now, I can run this command by hitting <enter>.  Or, I can use vi edit 
commands to edit it.  So, I could change 'bob' to 'tom' or whatever.

There are other commands, but these three are the ones I use most often.

HTH-
Jeff

On Tuesday 18 December 2001 20:23, you wrote:
> hi gang,
>
> I am trying to use the 'vi' version of history/command editing in bash.
> It seems really powerful, and I really like vi in general.
>
> Question: can anyone offfer  a quick tips note, or point me to an
> online source for same that illustrates the (correct use of) major
> features of this configuration?
>
> aloha (& TIA)
> dave
> _______________________________________________
> CLUE-Tech mailing list
> CLUE-Tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech



More information about the clue-tech mailing list