zsh-workers
 help / color / mirror / code / Atom feed
* Compsys and KSH_AUTOLOAD
@ 2004-04-10 17:44 Bart Schaefer
  2004-04-12 14:00 ` Oliver Kiddle
  2004-04-14 19:55 ` Peter Stephenson
  0 siblings, 2 replies; 20+ messages in thread
From: Bart Schaefer @ 2004-04-10 17:44 UTC (permalink / raw)
  To: zsh-workers

I've been having an off-list discussion with Matthias Kopfermann about
trouble he's had using the completion system with KSH_AUTOLOAD set.  He
tried the "zcompile -z" stuff (actually the zrecompile loop) suggested
in the manual, but it didn't work for him (I haven't investigated that
yet).  In glancing through compinit I noted that NO_kshautoload is
conspicuously absent from _comp_options.

So I tried this:

#--- 8< --- snip ---
autoload +X -z compinit _main_complete _complete_help _complete_debug \
	_expand_alias _bash_completions _history_complete_word _next_tags
compinit				# Append your usual options
_comp_options+=(NO_kshautoload)		# Need 4.2.x for += to work
#--- 8< --- snip ---

The list of functions after compinit in the autoload line are all those
that eval $_comp_setup -- that is, all the "entry points" to compsys, or
at least all the correctly-implemented entry points.  (_complete_debug
doesn't do the eval, but it's just a wrapper around _main_complete.)

This seems to work out just fine in my tests (I haven't heard back from
Matthias yet).  Which brings me to my questions:

(1) Does this deserve a FAQ entry, or perhaps even a change to the
compsys documentation?  I guess ksh_autoload isn't a very "frequently"
used option, but even the existing paragraph in the manual about it not
working is pretty deeply buried.

(2) Should we change _comp_options to always include NO_kshautoload?

(3) Should we change compinit to run the autoload +X -z of the entry
points iff kshautoload is set?

(4) If the answer to (3) is "yes," should we have some sort of flag to
identify such entry points so we don't need to maintain an accurate list
in compinit?  For those like _main_complete that have an #autoload line,
we could just append "-z" to that, but e.g. _expand_alias is a widget
and has a #compdef line instead.


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2004-04-20 10:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-10 17:44 Compsys and KSH_AUTOLOAD Bart Schaefer
2004-04-12 14:00 ` Oliver Kiddle
2004-04-12 15:59   ` Bart Schaefer
2004-04-12 21:43     ` Oliver Kiddle
2004-04-13  5:32       ` While we're on the subject of zcompile Bart Schaefer
2004-04-17 21:08         ` Oliver Kiddle
2004-04-13  5:38       ` Compsys and KSH_AUTOLOAD Bart Schaefer
2004-04-13 15:29         ` PATCH: " Oliver Kiddle
2004-04-13 17:51           ` Bart Schaefer
2004-04-16 16:49             ` Oliver Kiddle
2004-04-16 17:25               ` Bart Schaefer
2004-04-18 13:46                 ` Oliver Kiddle
2004-04-16 17:30               ` Bart Schaefer
2004-04-17 19:51                 ` Oliver Kiddle
2004-04-19  0:14                   ` Bart Schaefer
2004-04-19 10:18                     ` Oliver Kiddle
2004-04-20  4:11                       ` Bart Schaefer
2004-04-20 10:08                         ` Oliver Kiddle
2004-04-14  5:04           ` Bart Schaefer
2004-04-14 19:55 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).