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

Re: missing -o kshautoload checks



On Jul 31, 11:14pm, Adam Spiers wrote:
} 
} A recursive grep for '_[a-z_]* "$@"' in the Completion directory
} reveals that there are quite a few of these [[ -o kshautoload ]]
} checks missing.  I'm a bit short on time right now; any kind soul care
} to add them in?

I think there was at least a semi-conscious decision to stop including
those lines.  Chapter "Completion System" section "Initialization" heading
"Autoloaded files" explains:

  Note also that the functions for the completion system assume that the
  KSH_AUTOLOAD option is not set and cannot be loaded when it is set.  To
  avoid having to unset KSH_AUTOLOAD, you can instead use one or more zwc
  file which have been created with the command zcompile -z to load
  the functions for the completion system; see *Note Shell Builtin
  Commands::.  This forces the functions to be autoloaded the way zsh
  normally loads functions.

I haven't actually tried it, but I'm pretty sure that if you `zcompile -z'
a file that ends with `[[ -o kshautoload ]] && $0 "$@"', and you have
kshautoload set, you'll end up executing the function *twice* the first
time it's autoloaded.  So really we should be *removing* all the checks
for kshautoload, not adding more of them.

-- 
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