From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13262 invoked from network); 11 Mar 2003 13:49:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Mar 2003 13:49:36 -0000 Received: (qmail 23708 invoked by alias); 11 Mar 2003 13:49:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18339 Received: (qmail 23695 invoked from network); 11 Mar 2003 13:49:29 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 11 Mar 2003 13:49:29 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.12] by sunsite.dk (MessageWall 1.0.8) with SMTP; 11 Mar 2003 13:49:29 -0000 Received: (qmail 23894 invoked from network); 11 Mar 2003 13:49:28 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-16.tower-4.messagelabs.com with SMTP; 11 Mar 2003 13:49:28 -0000 Received: from finches.logica.co.uk ([158.234.142.11]) by iris.logica.co.uk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id NAA27207; Tue, 11 Mar 2003 13:49:28 GMT X-Authentication-Warning: iris.logica.co.uk: Host [158.234.142.11] claimed to be finches.logica.co.uk Received: from finches.logica.co.uk (localhost [127.0.0.1]) by finches.logica.co.uk (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h2BDrM817465; Tue, 11 Mar 2003 14:53:22 +0100 cc: zsh-workers@sunsite.dk X-VirusChecked: Checked In-reply-to: <87r89eiht2.wl@nemui.org> From: Oliver Kiddle References: <87r89eiht2.wl@nemui.org> To: Tatsuki Sugiura Subject: Re: PATCH _hosts: can complete hosts listed on ~/.ssh/config Date: Tue, 11 Mar 2003 14:53:22 +0100 Message-ID: <17463.1047390802@finches.logica.co.uk> Tatsuki Sugiura wrote: > Hello. > > Usually, "/etc/hosts" dos not contain hostname to wish to complete. > This pactch parse ~/.ssh/config and pick up hosts listed as "Host" > or "HostName". Picking up hosts from a "Host" line is perhaps not wise because it can contain ssh specific nicknames and wildcards. I'd be more inclined to use ~/.ssh/known_hosts. You can use a style to specify your hosts for ssh: zstyle ':completion:*:(ssh|scp):*:my-accounts' users-hosts user@host Or use this: ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} to set the hosts style. That said, I appreciate that it could be more intelligent out-of-the-box. The way I envision that eventually working involves integrating with user and port completion more flexibly than _combination and it isn't trivial. Oliver