How to use _known_hosts_real
bash completion function?
#65
Replies: 2 comments
-
There are three things that can be used as completions with completely:
As I understand, So bottom line, unless you have a function that you can run in your shell, and that returns (outputs) whitespace delimited list of known hosts, I cannot think of a way to use it. |
Beta Was this translation helpful? Give feedback.
-
Another thing - in case you are looking for alternatives. Using this configuration will show the known hosts from your ssh config: # completely.yaml
mygit:
- $(grep -P "^Host ([^*]+)$" $HOME/.ssh/config | sed 's/Host //') You can test it with Perhaps you can use a similar approach to parse any other file that contains the desired information. |
Beta Was this translation helpful? Give feedback.
-
Instead of using the regular
<hostname>
suggestion keyword, I'd like to use Bash's_known_hosts_real
function, which parses ssh'sknown_hosts
file andavahi-browse -cpr _workstation._tcp
to list commonly accessed host names.Beta Was this translation helpful? Give feedback.
All reactions