LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   key combo for searching commandline ie control+] (https://www.linuxquestions.org/questions/linux-newbie-8/key-combo-for-searching-commandline-ie-control-%5D-710286/)

glinux 03-09-2009 12:30 PM

key combo for searching commandline ie control+]
 
Hi,

is there a key combination to search *repeatedly* across the commandline?

it's possible to move the cursor to the first occurence of a character on the commandline using the key combination control + ] but, if one wishes to repeat the search, the same key combination along with the character of interest has to be reentered.

this problem occurs when there are several occurences of the search letter in the commandline. to get the cursor in the following example to the final 'c' one has to enter control + ] + c several times(if one wishes):

$ tar -cvf file.c file.cc file.ccc file.ccccc file.d

this is a very useful key combination but it could be improved upon.

also is there a equivalent key combination for alt + left/right arrow key for moving the commandline cursor between words?

glinux

openSauce 03-10-2009 06:42 AM

Quote:

Originally Posted by glinux (Post 3469856)
also is there a equivalent key combination for alt + left/right arrow key for moving the commandline cursor between words?

Ctrl + left/right should work.

I don't know if there's a way to repeat the last character search, but the bash manpage documents all this (search for the line beginning "READLINE").


All times are GMT -5. The time now is 06:19 AM.