zsh-workers
 help / color / mirror / code / Atom feed
* Re: prefix-needed style in _popd
@ 2001-03-27  9:42 Sven Wischnowsky
  2001-03-27 11:39 ` Oliver Kiddle
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 2001-03-27  9:42 UTC (permalink / raw)
  To: zsh-workers


Oliver Kiddle wrote:

> I just noticed that the completion of directory stacks (in _popd but
> used also for cd and pushd) doesn't work properly when the
> prefix-needed style is set to false. What it does is check the style
> and skip the return which normally relies on PREFIX matching [-+]*.
> What it doesn't do is complete the initial - or + because those are
> normally included in the added matches with ${PREFIX[1]} so we get just
> the numbers added as matches.

Bleah... I never liked that prefix-needed business.

> In this case we could either complete each directory stack entry twice,
> preceded by each of - and +, complete only one of those (possibly
> selected with a style) or remove support for prefix-needed in _popd. I
> basically favour the latter but then I've always had prefix-needed set
> true so don't care much. Does anyone else have any opinions or ideas on
> this?

Hm.  We're here at the core of the zsh-philosophy, aren't we?  Do it
in a predictable, complete and consequential way.  Then go back and
make it configurable to allow people to get what they want -- even if
they don't know it yet -- and make the default what most people would
expect or want if they knew.  Or something like that ;-)

Removing the prefix-needed handling is of course the easiest thing
(and give the behaviour I almost certainly would want and expect,
too).  For that completeness thing we would have to add every entry
with `+' and `-'.

In short: I don't know what to do and since I seldom use directory
stack completion, I don't care much about how we decide to do it.
But maybe we should add the matches with the prefix just for
completeness' sake.  Users can always set prefix-needed to false for
the directory-stack tag.

Bye
 Sven


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


^ permalink raw reply	[flat|nested] 7+ messages in thread
* prefix-needed style in _popd
@ 2001-03-27  9:22 Oliver Kiddle
  0 siblings, 0 replies; 7+ messages in thread
From: Oliver Kiddle @ 2001-03-27  9:22 UTC (permalink / raw)
  To: zsh-workers

I just noticed that the completion of directory stacks (in _popd but
used also for cd and pushd) doesn't work properly when the
prefix-needed style is set to false. What it does is check the style
and skip the return which normally relies on PREFIX matching [-+]*.
What it doesn't do is complete the initial - or + because those are
normally included in the added matches with ${PREFIX[1]} so we get just
the numbers added as matches.

In this case we could either complete each directory stack entry twice,
preceded by each of - and +, complete only one of those (possibly
selected with a style) or remove support for prefix-needed in _popd. I
basically favour the latter but then I've always had prefix-needed set
true so don't care much. Does anyone else have any opinions or ideas on
this?

Oliver

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-03-28 10:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-27  9:42 prefix-needed style in _popd Sven Wischnowsky
2001-03-27 11:39 ` Oliver Kiddle
2001-03-27 17:56   ` Bart Schaefer
2001-03-27 21:16     ` Oliver Kiddle
2001-03-28  6:22       ` Bart Schaefer
2001-03-28 10:03         ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2001-03-27  9:22 Oliver Kiddle

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