bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: up arrow to repeat command


From: Chet Ramey
Subject: Re: up arrow to repeat command
Date: Wed, 09 May 2007 12:28:18 -0400
User-agent: Thunderbird 2.0.0.0 (Macintosh/20070326)

_freak_ wrote:
> I use the up arrow to repeat commands in the bash shell.  One thing I am used
> to from csh is when I have a command I want to repeat that starts with "vi"
> I can type "vi" and then hit "up arrow" and it will repeat all the vi
> commands that I have used.  Bash does not seem to do this or at least I
> can't figure out how to make it do it.  Any tips?

Bind "history-search-backward" to the key sequence output by the up
arrow key.  If you want to do it from vi insert mode, make sure you
bind it in vi-insertion-keymap (if doing it from your inputrc, use
`set keymap vi-insert') or use the `-m vi-insert' option to the bash
bind builtin.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]