* Hmm, something wrong with _multi_parts?
@ 2000-02-21 8:52 Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-02-21 8:52 UTC (permalink / raw)
To: zsh-workers
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.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Hmm, something wrong with _multi_parts?
@ 2000-02-21 9:14 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-02-21 9:14 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-02-21 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-21 8:52 Hmm, something wrong with _multi_parts? Bart Schaefer
2000-02-21 9:14 Sven Wischnowsky
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).