Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So using (tab)(tab) in the bash is a cool autocomplete feature. However, here's my situation; when I type e.g. ssh(tab)(tab), it will display all the sshs I have but I have no way of greping from there. Is there a command to replace the (tab)(tab) or an ssh option to see them all and then grep from there? Thanks.

share|improve this question

migrated from stackoverflow.com Jul 4 '12 at 23:04

This question came from our site for professional and enthusiast programmers.

3  
I can't understand what you're asking. Please clarify. –  pb2q Jul 4 '12 at 22:44
    
Sorry I didn't realize I was missing the tabs, apparently the higher-than and lower-than signs are reserved –  Hec Jul 4 '12 at 22:56
    
just type another letter or two to disambiguate and tab again. –  Keith Jul 5 '12 at 2:59
    
grep? you can use visual grep 1.0 ... comes preinstalled in most humans. Have a look. –  lornix Jul 5 '12 at 9:16

2 Answers 2

I don't know how to accomplish exactly what you're asking, but instead you could possibly use the find command:

find /usr/bin -iname "ssh*keygen"
share|improve this answer

You really need more info. What completion are you using for ssh? What does complete | grep ssh say?

If it's hosts, you can use the hosts-complete keypress - I think alt-@ - anywhere, including after a grep. If it's something else, you'll need to figure out how to instantiate your completion some other way.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.