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

Re: problem completing anything after directory/<TAB>



On Apr 28,  1:19pm, Andre Pang wrote:
}
}     13:11 /% cd usr/<TAB>
}     completing `directory' or `corrections'
} 
} doesn't perform any completion whatsoever.
} 
} zsh details:
} 
}     kshglob

You've discovered a rather serious problem with the function compilation
scheme, and it's a good thing someone found it before the 4.0.1 release.

For those who haven't been following zsh-workers, some while back a new
mechanism was introduced whereby zsh functions are "compiled" into a very
compact internal coding so that they'll occupy less space and execute
faster.  One part of this compilation process is to pre-process glob
patterns when they appear inside [[ ]] or in `case' labels, into the form
used internally by the matching code, so that they don't have to be
recomputed every time they're used.

Unfortunately, zsh has options like kshglob that change the syntax of
glob patterns.  When the completion system functions are autoloaded
with kshglob in effect, the meanings of some of those patterns is
altered -- and is compiled into the function, so even though kshglob is
later turned off by the completion system, the [[ ]] and `case' patterns
retain their ksh interpretations and fail to work.

This is going to be somewhat difficult to fix; a possibility is that the
`zcompile -z' and `autoload -z' commands are going to have to be extended
to disable kshglob as well as kshautoload when processing a "zsh style"
function, and we may have to consider installing compiled rather than
(or as well as) text versions of all the completion system code.

But perhaps Sven and/or PWS, who are more familiar with the compilation
and globbing code than I, can think of a way to have the run-time rather
than compile-time setting of kshglob apply to those patterns, which
would be the preferred solution.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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