Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Function installation



Wayne Davison wrote:
> On Mon, 7 Jun 1999, Peter Stephenson wrote:
> > I've written a patch for installing the functions from the source
> > distribution
> 
> That reminds me.  Has anyone else run into a problem using compinit
> with the "no_unset" option enabled?  After getting errors on lines
> 57 and 53, I just unset the option before the sourcing of compinit
> in my zshrc file, and reset it after it was done.

After the patch, compinit seems to run with zsh -f and setopt nounset.

> [I'm only just now finding some time to try out the new completion
> stuff in 3.1.x, and so far (with just a little bit of twiddling) I
> haven't gotten it to work.  I'll have more time to play with it
> later on.]

Completion seemed to work OK, too, after the above, but it's possible
(likely, I would say) some of the functions aren't very happy with
nounset.

--- Completion/Core/compinit.unset	Fri Jun  4 15:19:08 1999
+++ Completion/Core/compinit	Mon Jun  7 10:54:15 1999
@@ -50,7 +50,7 @@
 _i_fdir=''
 _i_dumpfile=''
 _i_autodump=0
-while [[ $1 = -[df] ]]; do
+while [[ $# -gt 0 && $1 = -[df] ]]; do
   if [[ "$1" = -d ]]; then
     _i_autodump=1
     shift

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author