From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25015 invoked by alias); 10 Aug 2015 10:34:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36040 Received: (qmail 24650 invoked from network); 10 Aug 2015 10:33:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 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= Date: Mon, 10 Aug 2015 12:33:55 +0200 From: Moritz Bunkus To: zsh-workers@zsh.org Subject: ssh host completion: ~/.ssh/config vs /etc/hosts Message-ID: <20150810103355.GH4077@bunkus.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JI+G0+mN8WmwPnOn" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-Virus-Scanned: clamav-milter 0.98.7 at liselle X-Virus-Status: Clean --JI+G0+mN8WmwPnOn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =C2=BBssh testme-=C2=AB will list testme-backup and testme-vcenter but not testme-nagios. Typing =C2=BBssh testme-n=C2=AB, however, will compelte to =C2=BBssh testme-nagios=C2=AB. On the other hand typing =C2=BBssh other-=C2=AB 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 =C2=BBssh testme-=C2=AB and observe the bug. Kind regards, mosu --JI+G0+mN8WmwPnOn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVyH4TAAoJEHSvAK3y4yyFV8YP/iIvrRTK5t6gdN6KxF8aSb94 qb1OdZNMIat78TpGnNpozJVV9JBdPYzYmgboFpWLg6TBD0Fkkma70LYjpZLboZGd aumPhj9JC8+EUxoYHxBBaYkqkjYFc2Fe9/P2Kti+u3zxC2w/Mq62yoWT1SkfrIpM DPD3mZAlOPvEYM2O6ZZXtfVJE2Y3i19v2sWIP21BsxBwsAFrsWvLIcGYX8mKliSd QDJgIQKufZN9F+Ii+bKB6gQFysPHv14gkJVcQ/R8+I9qxlaMyVgxbTdGJRK1OrKO Sqy5ukZDUdhedn8Ece/8lkm/ASFLwnc1YDbyXAdfIVUWdW1x5TFSIDEuFp3aFA5J rmHtUCFPYn+pqSqUkpDVBQHX2mSHDVrGOIQXMB917+es1I4HP2xOdFTno19teYsp b8ltGAe7xigVxe+707JwOgOn/1dgYZzOQ510/DAh4Y4YHV0BGhnd9miAyKot92of o4iFeWUm5BT9eMtCe5R8uLbv6lUgV/3n39HSjm/0TSw+4t4xmuNkkXEaKLmsck+Q Fd/0VRzUkeF5JXa0aPGd2AXa+9yUdC2MLYe2rUoybnqkQNoKXL1F+K+wOR+B7Q14 fmp+Y2tno3+zG+gLITjkvqMtrga2F7IMP1SY8VQW2YpgUL9cJywcvvYedid655y/ YKfESghsPB63k7cQlfk8 =FVl3 -----END PGP SIGNATURE----- --JI+G0+mN8WmwPnOn--