zsh-workers
 help / color / mirror / code / Atom feed
* Re: Something else wrong with _multi_parts
@ 2000-02-21 10:01 Sven Wischnowsky
  2000-02-21 10:42 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 2000-02-21 10:01 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> Given something like
> 
> 	names=( foo bar home/test /usr/tmp /tmp/foo )
> 	_multi_parts / names
> 
> Only (/usr/tmp /tmp/foo) make it into the `matches' array in _multi_parts.
> I would have expected to be offered (foo bar home /) as the initial set of
> completions.

At one point while building this patch I got (with /<TAB>) the matches 
`/' and `home'. Somehow, this is correct, but I think the behaviour
this shows now is more intuitive.

Bye
 Sven

diff -ru ../z.old/Completion/Core/_multi_parts Completion/Core/_multi_parts
--- ../z.old/Completion/Core/_multi_parts	Mon Feb 21 10:50:49 2000
+++ Completion/Core/_multi_parts	Mon Feb 21 10:59:05 2000
@@ -80,7 +80,11 @@
   # use the stuff from the line. This avoids having `foo' complete to
   # both `foo' and `foobar'.
 
-  tmp1=( "${(@M)matches:#${PREFIX}${SUFFIX}${sep}*}" )
+  if [[ -n "$PREFIX$SUFFIX" || "$pre" = ${sep}* ]]; then
+    tmp1=( "${(@M)matches:#${PREFIX}${SUFFIX}${sep}*}" )
+  else
+    tmp1=
+  fi
 
   if (( $#tmp1 )); then
     npref="${PREFIX}${SUFFIX}${sep}"

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


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Something else wrong with _multi_parts
@ 2000-02-21  9:41 Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2000-02-21  9:41 UTC (permalink / raw)
  To: zsh-workers

Given something like

	names=( foo bar home/test /usr/tmp /tmp/foo )
	_multi_parts / names

Only (/usr/tmp /tmp/foo) make it into the `matches' array in _multi_parts.
I would have expected to be offered (foo bar home /) as the initial set of
completions.

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


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

end of thread, other threads:[~2000-02-21 10:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-21 10:01 Something else wrong with _multi_parts Sven Wischnowsky
2000-02-21 10:42 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-02-21  9:41 Bart Schaefer

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