zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@math.gatech.edu
Subject: Re: Compctl completion tweaking
Date: Thu, 25 Jun 1998 12:08:36 -0700	[thread overview]
Message-ID: <980625120836.ZM4064@candle.brasslantern.com> (raw)
In-Reply-To: <199806240713.JAA12117@beta.informatik.hu-berlin.de>

On Jun 24,  9:13am, Sven Wischnowsky wrote:
} Subject: Re: Compctl completion tweaking
}
} 
} Bart Schaefer wrote:
} > 
} > I've been meaning to mention that I think menucompletion and listings
} > should evaluate -all- the alternatives in an alternative completion,
} > not just the first one that happens to return something non-empty.
} 
} I think including them in the listing might be confusing (something
} like: Hey, it shows this as a possible completion but it doesn't allow 
} me to complete to it).

Maybe this is just a documentation issue:  Don't use alternatives when
they overlap.  Or maybe I don't understand the reasoning behind using an
xor in the first place; why -sometimes- hide some of the completions?

} with AUTO_MENU we would need some special casing in the code. And in
} this case it may again be confusing: you try completion, it shows you, 
} say, two or three possible completions, so you decide to continue
} tabbing to start menucompletion instead of typing the charcter neede
} to make things unambiguous. But instead of cycling through the few
} matches shown it suddenly uses the other xor-cases and starts cycling
} through a list of, say, 20 or more completions. Certainly not what I
} would expect (or like).

That's why I said "... menucompletion and listings should ...".  If you're
going to menu through them all, you have to list them all, and vice-versa.

The whole concept of xor'ing completion lists is potentially confusing;
you're just pointing out different ways that confusion could surface.

} For me, the only acceptable way to solve this would be a new compctl
} syntax for something like: xor'ed completion, but if this is used for
} menucompletion (because of MENU_COMPLETE or AUTO_MENU), use the
} following options immediatly.

Ick, no.  I want to increase consistency in completion behavior, not add
yet another case where it's inconsistent.

} Well, the meaning of xor'ed completions is that the other completions
} *are not* possible completions as long as the first bunch of flags
} produces matches.

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


  reply	other threads:[~1998-06-25 19:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-24  7:13 Sven Wischnowsky
1998-06-25 19:08 ` Bart Schaefer [this message]
  -- 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-26  5:44 Sven Wischnowsky
1998-06-26 18:59 ` Bart Schaefer
1998-06-24 11:00 Andrej Borsenkow
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=980625120836.ZM4064@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=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).