Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh does not offer ssh host from config



On Sat, Dec 10, 2022 at 9:06 PM Jan Palus <jpalus@xxxxxxxxxxxx> wrote:
>
> On 10.12.2022 13:08, Roman Perepelitsa wrote:
> >
> > If you only ever ssh to hosts listed in the ssh config, you can
> > configure ssh completions to respect that:
> >
> >     zstyle ':completion:*:(ssh|scp):*:hosts' hosts
> >
> > Listing all remote machines in the ssh config has other advantages
> > besides making completions more predictable.
>
>
> It's nice to have a possibility to customize behavior but I'd say more
> sensible default would be to offer both.

Oh, I'm not arguing in favor of the current implementation. I just
thought it might be useful to mention the setup I've made for myself
that works decently well.

> In my case it's much more practical to ie use pattern in ssh config for
> all the test envs instead of listing plenty of them explicitly.

I used to do that but then switched to my current setup where the ssh
config contains all remote machines (I generate it with a script). I
really like the ability to list all machines with a TAB. That said, I
can imagine environments where this kind of setup isn't possible.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author