From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6864 invoked from network); 29 Jan 2003 10:56:45 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Jan 2003 10:56:45 -0000 Received: (qmail 13832 invoked by alias); 29 Jan 2003 10:56:17 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5840 Received: (qmail 13825 invoked from network); 29 Jan 2003 10:56:17 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 29 Jan 2003 10:56:17 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.4] by sunsite.dk (MessageWall 1.0.8) with SMTP; 29 Jan 2003 10:56:17 -0000 X-VirusChecked: Checked X-Env-Sender: kiddleo@logica.com X-Msg-Ref: server-20.tower-1.messagelabs.com!1043837122!26882 Received: (qmail 7009 invoked from network); 29 Jan 2003 10:45:22 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-20.tower-1.messagelabs.com with SMTP; 29 Jan 2003 10:45:22 -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 KAA03569; Wed, 29 Jan 2003 10:44:22 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 h0TAlPZ01780; Wed, 29 Jan 2003 11:47:25 +0100 In-reply-to: <200301272332.12295.petre@kgb.ro> From: Oliver Kiddle References: <200301242057.49961.petre@kgb.ro> <11265.1043664899@finches.logica.co.uk> <200301272332.12295.petre@kgb.ro> To: Petre Bandac cc: zsh-users@sunsite.dk Subject: Re: [newbie] bash-like feature - autocompletion problem Date: Wed, 29 Jan 2003 11:47:25 +0100 Message-ID: <1778.1043837245@finches.logica.co.uk> Sender: kiddleo@logica.com On 27 Jan, Petre Bandac wrote: > > those are the files - I guess :-) > > On Monday 27 January 2003 12:54 Anno Domini, Oliver Kiddle wrote using one of his keyboards: > } On 24 Jan, you wrote: > } > on my linux machine (bash-2.5) I have added one entry in /etc/hosts > } > stating 192.168.0.1 host1 - which helped me when ssh-ing (just typing= > ssh > } > root@h[TAB] > } > > } > and I got the host1 completed) > } > > } > here, using zsh, I tried to do the same, but I get something like: > } > > } > [petre@kgb]$ more /etc/hosts | grep cockeru > } > > } > 192.168.108.176 cockeru > } > [petre@kgb]$ ssh root@coc > } > > } > No matches for: `remote host name', `host', or `corrections' > } > } It ought to work on zsh without you doing anything. You couldn't send me > } your /etc/hosts file by any chance? Have you set a hosts zstyle? > } > } > where and what should I modify ? > } > } Normallu, for ssh, I use something like: > } zstyle ':completion:*:(ssh|scp):*:my-accounts' users-hosts root@host1 > Content-Disposition: attachment; filename=".zshrc" > > # > # Example .zshrc file for zsh 4.0 > # > # Hosts to use for completion (see later zstyle) > hosts=(`hostname` ftp.math.gatech.edu prep.ai.mit.edu wuarchive.wustl.edu) > zstyle '*' hosts $hosts These two lines in your .zshrc are the reason. The hosts style here tells zsh's hosts completion to ignore /etc/hosts and complete the listed hosts instead. If you want it to use /etc/hosts, try removing at least the second of those lines. The example .zshrc wasn't really intended to be just picked up and used after changing nothing more than the prompt. Oliver This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.