carapace-sh / carapace-bin

multi-shell multi-command argument completer
https://carapace.sh
MIT License
836 stars 46 forks source link

ssh completer #313

Open rsteube opened 3 years ago

rsteube commented 3 years ago

Command

ssh

Description

OpenSSH remote login client

Homepage

https://www.openssh.com/

Documentation

https://man.openbsd.org/ssh

Repository

OpenSSH is the premier connectivity tool for remote login with the SSH protocol.

Complexity

M

Anything else?

No response

Tasks

finalize ssh completer

Polar

Fund with Polar

tminich commented 1 year ago

Hope it's fine if I add this here, but all completion for ssh hosts should (imo) include host definitions from the configuration (.ssh/config) excluding ones containing wildcards.

Example with ripgrep:

rg --pcre2 -o -N '(?<=Host (?!.*\*))(.*)$' .ssh/config
rsteube commented 1 year ago

Agree on that, just didn't get around to parsing the config yet.