Hi,
Am So den 5. Apr 2026 um 12:36 schrieb Mikael Magnusson:
> > Assume:
> > local -a pcomps=('bzip2' 'lzip')
> >
> > Now try to keep matching parts:
> > echo "${(M)pcomps:#bzip2}" # -> ""
> > echo ${(M)pcomps:#bzip2} # -> "bzip2"
>
> an array in double quoted context will be joined by spaces, the
> following will do what you want:
> % echo "${(M@)pcomps:#bzip2}"
> bzip2
Well, I expected that and it should not matter in that situation as the
value "bzip2" is the only remaining value in the array so when joined
should be still _not_ "" (empty)
Regards
Klaus
--
Klaus Ethgen http://www.ethgen.ch/
pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen <Klaus@xxxxxxxxx>
Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C