laloch / xontrib-fzf-widgets

Set of fzf widgets for xonsh
GNU General Public License v3.0
33 stars 18 forks source link

ssh binding includes wildcard hosts #20

Open con-f-use opened 3 years ago

con-f-use commented 3 years ago

The ssh-binding includes hosts from ~/.ssh/config that contain wildcards. These are useless in most circumstances.

$ cat ~/.ssh/config
Host *
    ServerAliveInterval 60
    PreferredAuthentications publickey,keyboard-interactive,password,hostbased,gssapi-with-mic
    VisualHostKey yes

Host *+*
    ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') exec nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /')

Host Normal_Host
  HostName host.example
  User confus

Here * and *+* are returned in addition to Normal_Host.