From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13330 invoked from network); 29 Jan 2003 23:02:39 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Jan 2003 23:02:39 -0000 Received: (qmail 24452 invoked by alias); 29 Jan 2003 23:02:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5844 Received: (qmail 24444 invoked from network); 29 Jan 2003 23:02:10 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 29 Jan 2003 23:02:10 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.194.64.3] by sunsite.dk (MessageWall 1.0.8) with SMTP; 29 Jan 2003 23:2:9 -0000 Received: from bruce.csse.monash.edu.au (localhost [127.0.0.1]) by bruce.csse.monash.edu.au (8.12.2+Sun/8.12.2) with ESMTP id h0TN26Kl003715; Thu, 30 Jan 2003 10:02:06 +1100 (EST) Received: (from debbiep@localhost) by bruce.csse.monash.edu.au (8.12.2+Sun/8.12.2/Submit) id h0TN22qC003702; Thu, 30 Jan 2003 10:02:02 +1100 (EST) From: Deborah Ariel Pickett Message-Id: <200301292302.h0TN22qC003702@bruce.csse.monash.edu.au> Subject: Re: [newbie] bash-like feature - autocompletion problem To: petre@kgb.ro Date: Thu, 30 Jan 2003 10:02:02 +1100 (EST) Cc: zsh-users@sunsite.dk (ZSH User List) In-Reply-To: <200301242057.49961.petre@kgb.ro> from "Petre Bandac" at Jan 24, 2003 08:57:49 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > I have switched to zsh with the installation of a freebsd workstation @ home; > among others, I have the following problem: > 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' > I'm using > [petre@kgb]$ zsh --version > zsh 4.0.6 (i386-portbld-freebsd4.7) > where and what should I modify ? Here's a little fragment of my .zshrc: zstyle ':completion:*' hosts `\ [[ -f ~/.hosts ]] && sed 's/ .*$//' < ~/.hosts; [[ -f ~/.rhosts ]] && sed 's/ .*$//' < ~/.rhosts` The whole bit between the `...` is just a sed script which grabs hostnames from various files. The newer (non-compctl) zsh completion system seems to make use of a style. If you don't set that style with a zstyle command, zsh can't guess what your hosts are. It seems that zsh doesn't pick any files by default for a list of hostnames. I'd say that in your situation you'd want to do something like zstyle ':completion:*' hosts `cat /etc/hosts` (or fancier versions which I'm sure others here will suggest that don't use cat or sed) in your .zshrc. Let me know how it goes. -- Debbie Pickett http://www.csse.monash.edu.au/~debbiep debbiep@csse.monash.edu.au "Beaujolais goes straight to my head, beaujolais puts me to shame, And I don't know why I'm in this place or how I came." - _Beaujolais_, The Alan Parsons Project