Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Hmm, something wrong with _multi_parts?
- X-seq: zsh-workers 9806
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Hmm, something wrong with _multi_parts?
- Date: Mon, 21 Feb 2000 10:14:29 +0100 (MET)
- In-reply-to: "Bart Schaefer"'s message of Mon, 21 Feb 2000 08:52:57 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> The doc says:
>
> _multi_parts SEP ARRAY
> This function gets two arguments: a separator character and an
> array. As usual, the ARRAY may be either the name of an array
> parameter or a literal array in the form `(foo bar)' (i.e. a list
> of words separated by white space in parentheses). [...]
>
> But if I call it with "a literal array in the form `(foo bar)'" it behaves
> very strangely. Stuffing the same strings into an actual array and then
> using the name of that array works as I expect.
Oops.
Bye
Sven
diff -ru ../z.old/Completion/Core/_multi_parts Completion/Core/_multi_parts
--- ../z.old/Completion/Core/_multi_parts Fri Feb 18 15:42:42 2000
+++ Completion/Core/_multi_parts Mon Feb 21 10:13:47 2000
@@ -31,7 +31,7 @@
sep="$1"
if [[ "${2[1]}" = '(' ]]; then
- matches=( ${2[2,-2]} )
+ matches=( ${=2[2,-2]} )
else
matches=( "${(@P)2}" )
fi
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author