zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: Re: Compctl completion tweaking
Date: Fri, 26 Jun 1998 07:44:04 +0200 (MET DST)	[thread overview]
Message-ID: <199806260544.HAA16475@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Thu, 25 Jun 1998 12:08:36 -0700


"Bart Schaefer" wrote:

> 
> ...
> 
> Yes; the confusion occurs when two or more of the "bunches of flags" both
> would apply if only both were tried.  Even extended completion performs
> an xor (it stops as soon as any pattern matches); how do you accomplish
> an -inclusive- or?  Suppose I want to express this:
> 
>   If there is a word anywhere on the command line that begins with "co",
>   then complete file names.  In addition, if that word begins with "cons",
>   then complete directories as well.  Finally, if the word before the
>   current word is the name of a directory, then also complete commands.
> 
> That is, if I have
> 
>   zsh% foo cons /tmp z
> 
> and I press C-d, I want to see a list of files, directories, and commands
> whose names begin with z, all in the same list.
> 
> (Yes, I admit this is a highly contrived example.)

Currently the only way would be to use one `-x'-pattern for all three
of them, one for two of them, and one for the `co' alone (in this order).

So, if I understand you correctly, you really only want an an
inclusive or and that only with menucompletion and listing? Do you
want that to apply when automenu is used, too?

That last one is important for me. My examples played with the
difference between normal and menucompletion behaviour when automenu
is set. More precisely: I don't want it to suddenly switch from one
type of behaviour to the other.

A simple inclusive or is (of course) achieved by putting the flags
together without any `+', but that doesn't allow us to, e.g. define
multiple `-K' options or multiple combinations of flags with some of
the control-flags. If you wanted to point out this deficiency, I have
to agree, this is quite ugly. And of course the problem to write
down or'ed `-x'-patterns you mentioned sometimes makes compctls very
big and clumsy (i.e. there should be a way to...).

About the exclusively or'ed flags: my first example when I implemented
this (which is also what made me think of it and the example mentioned 
in the intro file) is the compctl for things like `latex'. Normally I
want `*.tex' files, but if there are none, I want something else (say
`-f' or whatever). But *if* there are any `*.tex' files I don't want
the completion code to use the xor'ed flags, I don't want to see them, 
I don't want to know about them (and thus, the completion code should
not even bother to look at them). Maybe the experience for people
using menucompletion is different here (I use only automenu), I would
like to know about that.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1998-06-26  5:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-26  5:44 Sven Wischnowsky [this message]
1998-06-26 18:59 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1998-07-06  6:37 Sven Wischnowsky
1998-07-01  6:13 Sven Wischnowsky
1998-07-03 19:33 ` Bart Schaefer
1998-06-30  5:49 Sven Wischnowsky
1998-06-30 19:02 ` Bart Schaefer
1998-06-29  8:40 Sven Wischnowsky
1998-06-29 15:48 ` Bart Schaefer
1998-06-24 11:00 Andrej Borsenkow
1998-06-24  7:13 Sven Wischnowsky
1998-06-25 19:08 ` Bart Schaefer
1998-06-24  6:19 Sven Wischnowsky
     [not found] <358FC264.1C7A9EFA@bigfoot.com>
1998-06-23 19:04 ` 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=199806260544.HAA16475@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --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).