zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@sunsite.auc.dk
Subject: Re: completion parameter suggestion
Date: Sat, 27 Feb 1999 19:09:20 -0800	[thread overview]
Message-ID: <990227190920.ZM2220@candle.brasslantern.com> (raw)
In-Reply-To: <199902261220.NAA31482@beta.informatik.hu-berlin.de>

On Feb 26,  1:20pm, Sven Wischnowsky wrote:
} Subject: Re: completion parameter suggestion
}
} Bart Schaefer wrote:
} > Incidentally, I've never been clear on where the "matcher number" is
} > coming from in the first place, nor what one would use it for.  Maybe I
} > just haven't looked through the examples closely enough.
} 
} [...]  global match specs (`compctl -M 'spec1' 'spec2'...),
} these are tried by the completion code in order [...]
} `MATCHER' is the number of the one which is currently tried.

Hrm.  I should think that the string rather than the number would be
of much more use here.  The `compctl -M` command may have been changed
without changing the function, in which case the function's idea of
what pattern goes with what number would be completely wrong.

} > How about another associative array called `menustate' that holds all
} > these things?
} 
} As for the menu stuff, ok. But the list stuff isn't connected to
} (only) menucompletion.

Well ... displaying a list and allowing the user to choose from it is
a "menu" even if it's not "menu completion" in the zsh sense.  "Menu
completion" is just a different way of displaying the list.  So I won't
have any problem with calling it `menustate' and putting list stuff in
there, or calling it `list_state' and putting menucomplete stuff in
there, or whatever, even if menucompletion isn't actually in use.

} > The other possibility would be to automatically insert a dummy element 0
} > into `words' when ksharrays is set, and automatically remove it when
} > ksharrays changes.  That could be done without hooking into the option
} > code if `words' was a special array with a special get-function.
} 
} Hadn't thought about that, yes maybe... (but it's the other way round, 
} isn't it?)

It is?  ksharrays means array indices start at 0, right?  So to get
words[1] to be the command in ksharrays state, you have to insert a
dummy element 0.  (In non-ksharrays state, there's already a dummy
element 0, which happens to be the same as element 1.)

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


  reply	other threads:[~1999-02-28  3:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-26 12:20 Sven Wischnowsky
1999-02-28  3:09 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-02-24 12:28 Sven Wischnowsky
1999-02-24 10:09 ` Sven Wischnowsky
1999-02-24 10:32   ` Peter Stephenson
1999-02-26  5:24     ` Bart Schaefer

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=990227190920.ZM2220@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.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).