2

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.

4
  • 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
1

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"
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy