From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25003 invoked by alias); 18 Mar 2013 15:15:23 -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: 31161 Received: (qmail 8359 invoked from network); 18 Mar 2013 15:15:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at gerf.org designates 173.255.230.223 as permitted sender) X-Virus-Scanned: Debian amavisd-new at gerf.org From: =?iso-8859-1?Q?Christian_H=F6ltje?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: bug: _ssh_hosts ignores ~/.ssh/config in favor of ~/.ssh/known_hosts Message-Id: Date: Mon, 18 Mar 2013 11:08:18 -0400 To: zsh-workers@zsh.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) Hello, all! It appears that in zsh 5.0.2 that the _ssh completion rule it is = ignoring ~/.ssh/config in favor of hosts in ~/.ssh/known_hosts. How to recreate the problem: 1. With a clean ~/.ssh/ directory. 2. Create an entry in ~/.ssh/config like so: Host foobar HostName foobar.example.com 3. Now try: ssh f 4. Note it completes as "ssh foobar" 5. Connect to host. 6. Say 'yes' to ssh prompt to add the host-key to known_hosts 7. Restart your zsh: exec zsh -l 8. Type: ssh f 9. Notice it completes to: "ssh foobar.example.com" and additional = s won't show the entry from ~/.ssh/config at all. I expected step 9 to be "ssh foobar" instead. Some other bugs in _ssh_hosts: It includes (multiple) '#' as completion targets. Presumably from = ~/.ssh/config? It doesn't understand known_hosts entries that look like: = [foobar.example.com]:1234 Workaround: Set 'HashKnownHosts yes' in your ~/.ssh/config -- then = nothing will match from ~/.ssh/known_hosts.=