Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug with bash emulation regarding ':'



On Sun, Jan 29, 2012 at 4:46 AM, Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
> 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}_"
> ---

Actually, the same with:

 true ${l:=$(_test)}
 blah=${l:=$(_test)}

Or pretty much anything.

-- 
Felipe Contreras



Messages sorted by: Reverse Date, Date, Thread, Author