From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9098 invoked from network); 16 Mar 2001 12:10:55 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Mar 2001 12:10:55 -0000 Received: (qmail 1824 invoked by alias); 16 Mar 2001 12:10:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13650 Received: (qmail 1813 invoked from network); 16 Mar 2001 12:10:24 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Moving completion functions In-Reply-To: Your message of "Thu, 15 Mar 2001 20:50:37 GMT." <3AB12B1D.7D48636A@u.genie.co.uk> Date: Fri, 16 Mar 2001 12:09:22 +0000 From: Peter Stephenson Oliver wrote: > To further explain my reasoning; we install the functions in > /usr/local/share, not /usr/local/lib. This means that we should be > prepared for the functions to be *shared* between different computers, > each of which may run a different operating system. For this reason, > the installation should/could include AIX, Linux, etc directories. This is a very good use for keeping subdirectories, but isn't the typical case. > But, > supposing we add something like a cgywin _path_files or a Linux _lsdev, > we would want to be sure that we are using the correct one. I think we should take great pains to avoid functions with different effects having the same names. If it becomes necessary to split functions, they should be _path_files_cygwin and _lsdev_linux with some kind of aliasing or selection mechanism (possibly via styles) where there's a possibility of a different function being called. They can still go in different directories, of course. > For some reason if you omit the hash -d and just set the variable, i.e. > for d in a b c; $d=/cygdrive/$d > I get error messages like this: > /home/administrator/.zshrc:48: no such file or directory: r=/cygdrive/r That doesn't work any more; you need to do for d in a b c; eval $d=/cygdrive/$d or for d in a b c; typeset -g $d=/cygdrive/$d (where the -g is mostly paranoia). There was some kind of reason for doing this at the time, beyond making people complain about gratuitous changes which stop things working (though I often think the second effect is the more significant). -- Peter Stephenson Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070