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

Re: 4.0.1-pre-1



Bart Schaefer wrote:

> ...
> 
> We appear to have given up on compadd flags, 8866.

Yes, at least I have (although I admit that I had completely forgotten 
about this).  There are already several people out there who have used 
one of the 3.1.x versions.  Not many of them will have used compadd,
though.

> ...
> 
> Again not a bug, but we discussed making $_is_gnu more generic, 10998.

This still sounds like a good idea, but there wasn't any discussion.

And there's more to this, as I've just discovered, while looking
through the guide.  It has to do with services.  They should allow one 
to say:

  compdef myzcat=zcat

to make completion for myzcat do exactly the same as for zcat.  And it 
almost works, but _zcat uses $_is_gnu and tries calling $words[1] for
that.  If the myzcat really behaves like the GNU-zcat this might be
ok, but maybe it doesn't duplicate its behaviour enough to make the
test succeed even if it otherwise allows (almost) the same as the
GNU-version.  One could say that the user then gets what he deserves
(for not using `compdef myzcat=gzcat'), but I thought I should at
least mention it here...

The patch below, btw, has to do with services, too.  The `compdef myzcat=gzcat'
didn't really work because gzcat itself uses the service `gunzip' and
compdef didn't test that.  It does now.

> ...
> 
> There was some discussion of better glob-option handling for _path_files
> in 13131.

Hmhm.  I think I was just too tired at the time.

Just as a reminder, it's about bareglobquals being unset by the user.
To handle this we would have to make _main_complete store that option
setting where _path_files can look at it.  That raises the question if 
we should make _main_complete save all previous option settings in
some hash.  And then we could remove _(un|)set_options (and the
remarks about them from the manual and the Guide) and make _options
use a style to decide if it should use only set or unset options.
With the parameter module saving the option settings is much less
expensive than it was when we decided not to do that.  Is anyone
against making these changes?

> ...
> 
> There was an apparent race condition discussed in 13297 and 13298.

I still can't reproduce that.


Bye
 Sven

Index: Completion/Core/compinit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/compinit,v
retrieving revision 1.15
diff -u -r1.15 compinit
--- Completion/Core/compinit	2001/02/13 03:16:55	1.15
+++ Completion/Core/compinit	2001/02/16 14:42:52
@@ -249,6 +249,7 @@
 	  cmd="${i%%\=*}"
 	  svc="${i#*\=}"
           func="$_comps[${(k)_services[(R)$svc]:-$svc}]"
+          (( $+_services[$svc] )) && svc=$_services[$svc]
 	  [[ -z "$func" ]] &&
 	    func="${_patcomps[(K)$svc][1]:-${_postpatcomps[(K)$svc][1]}}"
           if [[ -n "$func" ]]; then

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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