From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27198 invoked from network); 16 Jul 2004 15:08:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Jul 2004 15:08:41 -0000 Received: (qmail 5852 invoked from network); 16 Jul 2004 15:08:33 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Jul 2004 15:08:33 -0000 Received: (qmail 22793 invoked by alias); 16 Jul 2004 15:07:50 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7701 Received: (qmail 22783 invoked from network); 16 Jul 2004 15:07:50 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 16 Jul 2004 15:07:50 -0000 Received: (qmail 2900 invoked from network); 16 Jul 2004 15:05:52 -0000 Received: from nef.ens.fr (129.199.96.32) by a.mx.sunsite.dk with SMTP; 16 Jul 2004 15:05:49 -0000 Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.12.11/1.01.28121999) with ESMTP id i6GF5m9F086505 for ; Fri, 16 Jul 2004 17:05:48 +0200 (CEST) Received: from (rineau@localhost) by clipper.ens.fr (8.12.3/jb-1.1) Date: Fri, 16 Jul 2004 17:05:48 +0200 From: Laurent Rineau To: zsh-users Subject: Re: ssh scp completion Message-ID: <20040716150547.GA9564@clipper.ens.fr> References: <20040716094047.GA18775@xover.htu.tuwien.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040716094047.GA18775@xover.htu.tuwien.ac.at> User-Agent: Mutt/1.5.6i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.3.3 (nef.ens.fr [129.199.96.32]); Fri, 16 Jul 2004 17:05:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Fri, Jul 16, 2004 at 11:40:47AM +0200, Martin Marcher wrote: > from the ~/.ssh/config file syntax is: > > Host foo > . > . > > Host bar > . > . > > Host * > general options > > > now i want to only have the following completions: 'foo' and 'bar' the > manpages are way to big for me to find what I want, especially that i > don't really have an idea what sections i should have a look at. You can set up directly the style hosts: zstyle ':completion:*:*:*' hosts foo bar or use something like what I have in my .zshrc: [ -f ~/.ssh/config ] && : ${(A)ssh_config_hosts:=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}} [ -f ~/.ssh/known_hosts ] && : ${(A)ssh_known_hosts:=${${${(f)"$(<$HOME/.ssh/known_hosts)"}%%\ *}%%,*}} zstyle ':completion:*:*:*' hosts $ssh_config_hosts $ssh_known_hosts Remove $ssh_known_hosts if you do not want to add the content of .ssh/known_hosts