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


Groups > gnu.bash.bug > #13763

Re: Unset array doesn't work

Path csiph.com!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!not-for-mail
From Robert Elz <kre@munnari.OZ.AU>
Newsgroups gnu.bash.bug
Subject Re: Unset array doesn't work
Date Wed, 28 Feb 2018 03:49:41 +0700
Lines 48
Approved bug-bash@gnu.org
Message-ID <mailman.9844.1519786861.27995.bug-bash@gnu.org> (permalink)
References <21679c48-4064-5683-2d5f-91bfb76687d0@case.edu> <790ade74-690f-541c-9ab4-6359917442d0@case.edu> <a56e05b1-0b34-1cb2-6073-91c12f27e228@gmail.com> <a642644f-e475-6361-140e-5b47ab4e321c@case.edu> <755d61fa-d2bc-8855-bc30-4388aff40691@gmail.com> <9974.1519637469@jinx.noi.kre.to>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1519786862 857 208.118.235.17 (28 Feb 2018 03:01:02 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To chet.ramey@case.edu
Envelope-to bug-bash@gnu.org
In-Reply-To <21679c48-4064-5683-2d5f-91bfb76687d0@case.edu>
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2001:3c8:9009:181::2
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash/>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:13763

Show key headers only | View raw


    Date:        Tue, 27 Feb 2018 11:18:40 -0500
    From:        Chet Ramey <chet.ramey@case.edu>
    Message-ID:  <21679c48-4064-5683-2d5f-91bfb76687d0@case.edu>

  | It doesn't. Run the following script:

OK, that looks good.  But now I am very confused.

  | You'll see that the first expansion of `$var' uses the local value of IFS,
  | the second expansion uses the default value of $' \t\n', and the global
  | value doesn't change (or get unset) outside the function.

Yes, and I was never expecting the global to be changed (that is, in this,
I didn't imagine that as a possibility).

  | The objection was that the global or previous-scope value didn't get unset
  | when using the `unset' builtin; only in the local scope was it unset.

I was in e-mail catchup mode, I am not sure I even saw the original, but I
do tend to read your messages, and what you said (12 Feb) was ...

  |  The visibility of a local variable is restricted to a function and its
  | children,

That's fine.

  | and `unset' removes the currently-visible instance.

as is that,  at least if "removes" is interpreted in one way (which the
script you sent suggests is correct).

But:

  | Removing such an instance can `unconver' an instance in a previous scope.

What's that?

That;s not what the script shows happening, the global IFS was not
"uncovered" (whatever that means). 

It was that sentence that caused my reply.

Since it does not seem to mean what I thought it meant, perhaps you could
say what it did mean?

kre

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Unset array doesn't work Robert Elz <kre@munnari.OZ.AU> - 2018-02-28 03:49 +0700

csiph-web