bug-bash
[Top][All Lists]
Advanced

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

Re: test -v for array does not work as documented


From: pepa65
Subject: Re: test -v for array does not work as documented
Date: Fri, 21 Feb 2020 15:31:28 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 21/02/2020 02.37, Chet Ramey wrote:
> It's unset because it doesn't have a value, but it retains the `local'
> attribute so it stays local if subsequently assigned one.

Is there any reason the local attribute cannot be unset? If it would be
possible then the "declare/typeset -p" would return 1 when the variable
doesn't exist.

By the way, it seems that `local -p var` doesn't work like 'declare -p
var` even though `help local` suggests it should.

Peter



reply via email to

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