zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: Compsys and KSH_AUTOLOAD
Date: Mon, 12 Apr 2004 16:00:12 +0200	[thread overview]
Message-ID: <1170.1081778412@athlon> (raw)
In-Reply-To: <1040410174430.ZM10891@candle.brasslantern.com>

Bart wrote:
> 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

It is only for compinit itself that I can get problems with that to
occur. It seems to be a little sensitive about the contents of $fpath
but the following works for me: 

  zcompile -z -U comp /usr/local/share/zsh/4.2.0/functions/Completion/**/*(.)
  zsh -f
  fpath=( ~/comp.zwc $fpath )
  setopt kshautoload
  autoload compinit
  compinit

compinit ought to be able to look inside the .zwc file so you don't
even need the functions to be there.

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

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

It'd be better if we can get it to just work.

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

I'd prefer if we can avoid adding to _comp_options.

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

This is one option and if we took it, we'd want to go with (4) so
user's can add their own entry point functions. It is just adding more
complexity though. Also, looking at the list of entry points, there are
functions I never use, making autoload +X a waste of time and memory.

Is there any reason why the -z and -k options to autoload can only be
used with +X. It would seem to me that the best would be if compinit
could use `autoload -U -z' with functions being setup to look like this:

  _autoload () {
          # undefined
          builtin autoload -XUz
  }

Would that be a possibilty?

Oliver


  reply	other threads:[~2004-04-12 13:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-10 17:44 Bart Schaefer
2004-04-12 14:00 ` Oliver Kiddle [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1170.1081778412@athlon \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).