Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh does not offer ssh host from config
- X-seq: zsh-workers 51145
- From: Jan Palus <jpalus@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zsh does not offer ssh host from config
- Date: Fri, 9 Dec 2022 02:06:50 +0100
- Archived-at: <https://zsh.org/workers/51145>
- Feedback-id: i01894241:Fastmail
- List-id: <zsh-workers.zsh.org>
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. That's because of _ssh_hosts returning
on successful hosts completion:
# If users-hosts matches, we shouldn't complete anything else.
if [[ "$IPREFIX" == *@ ]]; then
_combination -s '[:@]' my-accounts users-hosts "users=${IPREFIX/@}" hosts "$@" && return
else
_combination -s '[:@]' my-accounts users-hosts \
${opt_args[-l]:+"users=${opt_args[-l]:q}"} hosts "$@" && return # <--- HERE
fi
Is this intentional that config file parsing is skipped entirely if host was
completed successfully?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author