Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
ssh host completion: ~/.ssh/config vs /etc/hosts
- X-seq: zsh-workers 36040
- From: Moritz Bunkus <moritz@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: ssh host completion: ~/.ssh/config vs /etc/hosts
- Date: Mon, 10 Aug 2015 12:33:55 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bunkus.org; s=mail2015070101; t=1439202836; bh=Oi8nSwF+WcSVFHT2GAtV6rOe7o2b1h+GRmSmezylh2E=; h=Date:From:To:Subject; b=ZG6lXs1IZZGkx+BGtJZUpXY2JAt35WrCSt8Sd3VPin3GC2Kp3bhHav3tv0+z+h+qJ mIXf2Eyw+40W3wtlDVs5VhtAsn3taP99+7l4l376mhJq/mqVnhcKkxzLx62f9dxsZK mlZfJZqV+jfqzhwg5SLKyAwbqADbA1KaklJa4V/bTrCsUhe2CimAab707+X8pT0xue 9393b7WHpiyvOpmakSzuBbNt0tBhXpYAa49vCZ1zkKCdaw2Y5p0uz/SRF4JDVH5dYO M5job59yvhAa+zv7iH/4SKpoGoQEFyHxhm1L6TqOOnV5b6MU7UjK67L+vCLcIaQQtn 1g6wh+h1V3jnGVNuBNmA/vqQG1hIwEXNXEG+FcF867mwZ2ECkNfGOUcaLyck5r8TvD KIaLULg8QkL51uM+MYDnbuIkmAh+efWWMvfe/Pp/iC7Rf+S5kW+GhW6E3xfpNhQf/o QQU1dtepVY7pqeOSexQ78wzZh21txPNr5O4mhad7lYREA1OSH2lCXaw/WKwwP1Ct6S EueLobGduKwI0Urj199EfdHffI1Usk2JdjZ6Bk7f3ZVqn0bsZqHT+bNkD5cFieS8nP cuS8NXxDxnj20yjie9Sr1mlBXH+gChvEfraO8SmeZV/nz4xCiSKOzPWY3mLuc8xSX/ zyApz7Zdg3y9Gz9e1agek0A4=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hey,
zsh 5.0.8
I just noticed this interesting thing: if certain hosts are listed in
/etc/hosts then the ssh completion will complete _but not list_ hosts in
~/.ssh/config that have the same prefix.
For example, let's take the following entries from /etc/hosts:
172.16.1.2 testme-backup
172.16.1.3 testme-vcenter
Let's assume further that I also have the following in my ~/.ssh/config:
Host testme-nagios
HostName 172.16.1.4
Host other-master
HostName 172.16.2.1
Host other-backup
HostName 162.16.2.2
Now typing »ssh testme-<TAB>« will list testme-backup and
testme-vcenter but not testme-nagios. Typing »ssh testme-n<TAB>«,
however, will compelte to »ssh testme-nagios«.
On the other hand typing »ssh other-<TAB>« will list both entries from
~/.ssh/config, other-master and other-backup. There are no entries in
/etc/hosts that start with other-.
Here's how to reproduce it:
1. Create the appropriate entries in /etc/hosts and ~/.ssh/config.
2. Start a shell and initialize the completion system:
zsh -f
autoload -Uz compinit
compinit
3. Try to complete »ssh testme-« and observe the bug.
Kind regards,
mosu
Attachment:
pgpseaSduLBaM.pgp
Description: PGP signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author