Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug with bash emulation regarding ':'
- X-seq: zsh-workers 30141
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Bug with bash emulation regarding ':'
- Date: Sun, 29 Jan 2012 04:46:35 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=FJuNGeWh0dULVECf0toitZEoyx8hlLo87flf+RgYlmM=; b=HMdpFHiOsamaMFw2WvhGN+gkc9vHSc+WK+DZOMyVF6mSJhSgmhfh1fB9VTFiAoJ4vj gPuDyTYvCdGKnXUHmXXPbBVAH+8f35eSVGq88MsrrVkxvdIHWezl5a8LAP51ysjwUWft C2kQxHcsClLKnFec+qkvZIng6CJGB3wF5/lQ8=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
Seems like there's a bug in bash emulation:
---
#!sh
_test ()
{
array="one two three"
for e in $array
do
echo "'$e'"
done
}
l=
: ${l:=$(_test)}
echo "_${l}_"
---
Bash generates:
_'one'
'two'
'three'_
Zsh with bash emulation generates:
_'one two three'_
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author