Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14076 > unrolled thread

Re: [BUG] 'unset' fails silently under specific conditions

Started byMartijn Dekker <martijn@inlv.org>
First post2018-05-01 23:27 +0100
Last post2018-05-01 23:27 +0100
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [BUG] 'unset' fails silently under specific conditions Martijn Dekker <martijn@inlv.org> - 2018-05-01 23:27 +0100

#14076 — Re: [BUG] 'unset' fails silently under specific conditions

FromMartijn Dekker <martijn@inlv.org>
Date2018-05-01 23:27 +0100
SubjectRe: [BUG] 'unset' fails silently under specific conditions
Message-ID<mailman.13231.1525213654.27995.bug-bash@gnu.org>
Op 01-05-18 om 19:36 schreef Chet Ramey:
> OK, so which is it? Does an assignment statement preceding a special
> builtin in a shell function create a local variable (as we discussed
> just yesterday)

Huh? That was about 'typeset'/'declare'. How is that relevant here?

>  or does it create a global variable because `Posix'?

Yes. POSIX does not specify local variables at all, and even in a bash 
context I see nothing there to indicate that it should be local.

The possibility that 'foo=bar :' might create a variable 'foo' that 
survives the ':' command, is exported, *and* is local to the function, 
hadn't occurred to me at all. POSIX is pretty strange sometimes but not 
*this* strange.

- M.

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web