From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27297 invoked from network); 26 Apr 2001 13:01:51 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Apr 2001 13:01:51 -0000 Received: (qmail 3346 invoked by alias); 26 Apr 2001 13:01:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14107 Received: (qmail 3289 invoked from network); 26 Apr 2001 13:01:31 -0000 From: Sven Wischnowsky Date: Thu, 26 Apr 2001 15:01:23 +0200 (MET DST) Message-Id: <200104261301.PAA04771@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: Distributed Completion/ structure and compinit In-Reply-To: <1010426081035.ZM12445@candle.brasslantern.com> Bart Schaefer wrote: > ... > > Either that, or we should fix the docs. Having it work for the source > tree layout is helpful to developers, I think: No "make install" before > trying out some change, just set _compdir and let compinstall figure it > out. However, developers are also likely capable of setting the fpath > manually, so it's not that big a deal. Not tested, but should work. Bye Sven Index: Completion/compaudit =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/compaudit,v retrieving revision 1.2 diff -u -r1.2 compaudit --- Completion/compaudit 2001/04/02 13:04:04 1.2 +++ Completion/compaudit 2001/04/26 13:00:56 @@ -55,11 +55,11 @@ # Too few files: we need some more directories, or we need to check # that all directories (not just Base) are present. _i_addfiles=() - if [[ $_compdir = */Base ]]; then - # Add all the Completion subdirectories - _i_addfiles=(${_compdir:h}/*(/)) + if [[ -d $_compdir/Base/Core ]]; then + # Add all the Completion subdirectories (CVS-layout) + _i_addfiles=(${_compdir}/*/*(/)) elif [[ -d $_compdir/Base ]]; then - # Likewise + # Likewise (installation-layout) _i_addfiles=(${_compdir}/*(/)) fi for _i_line in {1..$#i_addfiles}; do Index: Completion/compinstall =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/compinstall,v retrieving revision 1.2 diff -u -r1.2 compinstall --- Completion/compinstall 2001/04/02 13:04:04 1.2 +++ Completion/compinstall 2001/04/26 13:00:57 @@ -190,7 +190,9 @@ __ci_set_compdir $fpath -if [[ -d $compdir/Base ]]; then +if [[ -d $compdir/Base/Core ]]; then + subdirs=2 +elif [[ -d $compdir/Base ]]; then subdirs=1 ### compdir=${compdir:h} fi @@ -229,12 +231,18 @@ compinstall again." fi fi - if [[ -n $subdirs ]]; then + if [[ $subdirs = 2 ]]; then + fpath_line=($compdir/[A-Z]*/[A-Z]*) + fpath_line="fpath=($fpath ${(F)fpath_line})" + elif [[ -n $subdirs ]]; then fpath_line=($compdir/[A-Z]*) fpath_line="fpath=($fpath ${(F)fpath_line})" fi else - if [[ -n $subdirs ]]; then + if [[ $subdirs = 2 ]]; then + print "Completion directories $compdir/*/* +are already in your \$fpath, good." + elif [[ -n $subdirs ]]; then print "Completion directories $compdir/* are already in your \$fpath, good." else Index: Doc/Zsh/compsys.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v retrieving revision 1.118 diff -u -r1.118 compsys.yo --- Doc/Zsh/compsys.yo 2001/04/26 12:13:37 1.118 +++ Doc/Zsh/compsys.yo 2001/04/26 13:00:59 @@ -142,9 +142,10 @@ For incomplete installations, if tt(compinit) does not find enough files beginning with an underscore (fewer than twenty) in the search path, it will try to find more by adding the directory tt(_compdir) to the search -path. Furthermore, if the directory in question ends in the path segment -tt(Base), or has a subdirectory named tt(Base), tt(compinit) will add all -subdirectories of the directory where tt(Base) is to the path: this allows +path. If that directory has a subdirectory named tt(Base), all +subdirectories will be added to the path. Furthermore, if the subdirectory +tt(Base) has a subdirectory named tt(Core), tt(compinit) will add all +subdirectories of the subdirectories is to the path: this allows the functions to be in the same format as in the tt(zsh) source distribution. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de