bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug with -o posix, local variables and assignment preceding builtins


From: Chet Ramey
Subject: Re: Bug with -o posix, local variables and assignment preceding builtins
Date: Mon, 08 Feb 2010 17:38:26 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

On 2/7/10 8:33 PM, Crestez Dan Leonard wrote:
> We encountered a strange bug while working on bash-completion. I was
> originally only able to reproduce this through a fairly elaborate setup
> but Freddy Vulto <fvulto@gmail.com> found a tiny test case:
> 
>     set -o posix
>     t() {
>         local x
>         BAR=a eval true
>     }
>     BAR=b; t; echo $BAR
> 
> Bash documentation claims the following (section 6.11 point 23):

See if the attached patch does the trick.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

Attachment: propagate-temp-var
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]