zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@dcs.warwick.ac.uk>
To: schaefer@brasslantern.com
Cc: fclim@singnet.com.sg, zefram@dcs.warwick.ac.uk,
	zsh-workers@math.gatech.edu
Subject: Re: Autoloading of compctl from dbm database file.
Date: Sun, 1 Dec 1996 18:38:27 +0000 (GMT)	[thread overview]
Message-ID: <19536.199612011838@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <961201094226.ZM20801243@srf-58.nbn.com> from "Bart Schaefer" at Dec 1, 96 09:41:24 am

>> That is, bcompctl does the same job as compctl, but using a byte-
>> compiled form instead of the normal options.  "bcompctl -L > file"
>> could be used to save byte-compiled compctls in a form that can be
>> sourced quickly later.
>
>I don't think that goes far enough.  If you still have to parse and
>tokenize a command line for every compctl, the binary format hasn't
>won you very much.

The tokenisation is quite quick, though, isn't it?  The commands that
are output by the -L options are all simple commands, with only the
simplest forms of quoting.  And this has the advantage that the
bcompctl commands could be merged with other commands, or made
conditional if necessary.  I think that bypassing compctl's complex
command line parsing is worthwhile.  (I'll do some profiling to check
this.)

>Further, {b}compctl -L would have to get a lot smarter, and merge
>together into one output item the whole class of commands that use the
>same compctl.

Yes.  I'd like compctl to do this in any case.

>Version-independent will be the tough part; we'd better be darn sure
>we're storing compctls internally in the form we'll always want to store
>them, before we start saving them off as binary.

We could have a version number embedded in the binary, so that we can
make incompatible changes and gracefully reject old forms.  We would
usually want to avoid such changes, but that code doesn't change a
great deal anyway.  I think efficiency is likely to be the main
problem.

>A text format has some of the same problems -- I for one would love to
>see compctl move away from all these cryptic command-line switches and
>instead become a more structured construct with keywords etc.

Yes, this has been suggested several times.  I have vague plans of how
this would work.  I can see it blurring the distinction between
extended completions and normal completions somewhat.

-zefram


  parent reply	other threads:[~1996-12-01 18:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-30 13:31 Fung-Chai Lim
1996-11-30 16:40 ` Zefram
1996-11-30 23:16   ` Bart Schaefer
1996-12-01 12:55     ` Fung-Chai Lim
1996-12-01 14:02     ` Zefram
1996-12-01 17:41       ` Bart Schaefer
1996-12-01 18:08         ` what should compctl's look like? Richard Coleman
1996-12-01 18:54           ` Zefram
1996-12-01 18:38         ` Zefram [this message]
1996-12-02 13:23         ` Autoloading of compctl from dbm database file Fung-Chai Lim
1996-12-01 13:22   ` Fung-Chai Lim
1996-12-01 14:17     ` Zefram
1996-12-01 15:38       ` Fung-Chai Lim

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=19536.199612011838@stone.dcs.warwick.ac.uk \
    --to=zefram@dcs.warwick.ac.uk \
    --cc=fclim@singnet.com.sg \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).