fzf icon indicating copy to clipboard operation
fzf copied to clipboard

SSH-Config Include isn't supported

Open dploeger opened this issue 6 years ago • 4 comments

  • Category
    • [ ] fzf binary
    • [ ] fzf-tmux script
    • [ ] Key bindings
    • [X] Completion
    • [ ] Vim
    • [ ] Neovim
    • [ ] Etc.
  • OS
    • [ ] Linux
    • [X] Mac OS X
    • [ ] Windows
    • [ ] Windows Subsystem for Linux
    • [ ] Etc.
  • Shell
    • [X] bash
    • [ ] zsh
    • [ ] fish

If you use a "Include" directive in your ssh config (available since OpenSSH 7.3), which includes several files from a directory, the hosts defined in those files aren't included in the auto completion feature for SSH.

Include config.d/*
Host some-host
  HostName 1.2.3.4

dploeger avatar Oct 16 '18 14:10 dploeger

This would be really nice to have.

I've done more searching and I found an existing discussion around support for this in a PR https://github.com/junegunn/fzf/pull/1115.

sixlive avatar Jan 15 '19 10:01 sixlive

I create as the side a project a completion wrapper who use fzf over all original completion scripts named fzf-obc So if your original ssh completion works with include (and it works on base ubuntu 18.04), it should works too with fzf-obc (works on my computer). Give it a try and post an issue on fzf-obc if needed

Regards

rockandska avatar Nov 18 '19 20:11 rockandska

Still doesn't work

soar avatar Sep 18 '21 13:09 soar

For anyone using zsh, I found this solution: https://github.com/sunlei/zsh-ssh It uses fzf underwater.

Shourai avatar Jan 17 '23 16:01 Shourai