Description:
        [incorrect command found using ^r]

Repeat-By:
In user mode ($>):
        mount /cdrom
        ... (do some stuff)
        umount /cdrom
        ...
        ^r m

Instead of finding "mount /cdrom" it finds "umount /cdrom" and leaves the cursor blinking 
on the "m" of
cdrom.
Hmmm.....

    Which is exactly what it is supposed to do. By default, ^R is bound to:

       reverse-search-history (C-r)
              Search  backward  starting  at the current
              line and moving `up' through  the  history
              as  necessary.   This  is  an  incremental
              search.


    You sound as if you want:

       history-search-backward
              Search  backward  through  the history for
              the string of characters between the start
              of  the  current line and the point.  This
              is a non-incremental search.

    This is not bound to any key by default. I have it bound to
    shift+up-arrow by putting this in my ~/.inputrc file:


"\e[a": history-search-backward  ## shift+up-arrow


    You could then type "m" and press shift+up-arrow to get the line
    you want.

--
    Chris F.A. Johnson                     <http://cfaj.freeshell.org>
    ==================================================================
    Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
    <http://www.torfree.net/~chris/books/cfaj/ssr.html>


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to