zsh-workers
 help / color / mirror / code / Atom feed
From: Jan Palus <jpalus@fastmail.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: zsh does not offer ssh host from config
Date: Sat, 10 Dec 2022 21:06:02 +0100	[thread overview]
Message-ID: <20221210200602.ayy4d3yzd6vz52qc@pine.grzadka> (raw)
In-Reply-To: <CAN=4vMrpAh7ChTOobqhvE6ioNiWVr40+juSQaKe48OVZsYOjrg@mail.gmail.com>

On 10.12.2022 13:08, Roman Perepelitsa wrote:
> On Fri, Dec 9, 2022 at 2:07 AM Jan Palus <jpalus@fastmail.com> wrote:
> >
> > Hi,
> >
> > I've got a single real hostname starting with 'build' prefix which is present
> > in my known_hosts file. I also have a couple Host specifications in ssh config
> > file having names starting with 'build' but real HostName does not resolve to
> > name starting with 'build'. When doing `ssh build<tab>` I'd expect to be
> > offered both real hostname as well as Host specification names, however only
> > real hostname is immediately completed.
> 
> 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.

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.

It's nice to have a possibility to customize behavior but I'd say more
sensible default would be to offer both. Or in other words current
default behavior is somewhat counter-intuitive. Doing "build<tab>"
offers single completion, while doing more specific "builder<tab>"
offers 3. Intuitively with every char completion options should be
narrowed (or remain the same) but should not be broadened.


  reply	other threads:[~2022-12-10 20:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09  1:06 Jan Palus
2022-12-10 12:01 ` Daniel Shahaf
2022-12-10 12:08 ` Roman Perepelitsa
2022-12-10 20:06   ` Jan Palus [this message]
2022-12-10 20:31     ` Roman Perepelitsa
2022-12-10 20:49       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221210200602.ayy4d3yzd6vz52qc@pine.grzadka \
    --to=jpalus@fastmail.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).