ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.52k stars 624 forks source link

ssh completion doesn't include global ssh hosts #568

Open plasmastorm opened 1 month ago

plasmastorm commented 1 month ago

It would be good if ssh completion could include global hosts from /etc/ssh/ssh_known_hosts and /etc/ssh/ssh_config

Would be good to also support /etc/ssh/ssh_config.d/* in the same way as https://github.com/ohmybash/oh-my-bash/pull/529 is about to

akinomyoga commented 1 month ago

Would be good to also support /etc/ssh/ssh_config.d/* in the same way as #529 is about to

Those files are supposed to be included by /etc/ssh/ssh_config, so they are covered by #569.

A problem could be that the Includes in /etc/ssh/ssh_config.d are not considered with the current implementation of #569. Maybe we can consider supporting the recursive includes, but I'm not sure if we would do that here. The ssh completion provided here is a kind of a lightweight version of bash-completion, and we already have a full implementation for this processing in the upstream (https://github.com/scop/bash-completion/pull/80 and https://github.com/scop/bash-completion/pull/976). Users who request a certain level of quality should consider move to bash-completion.