On 8/1/22 3:38 PM, Robert E. Griffith wrote:
I just finished reading that 2018 discussion and the current discussion.
Its hard for me to understand why this is an issue. kre's use case was
unset X
y=$X
He called it 'braindead' for it to do anything expect to assign NULL/empty
to Y but
I just finished reading that 2018 discussion and the current discussion.
Its hard for me to understand why this is an issue. kre's use case was
unset X
y=$X
He called it 'braindead' for it to do anything expect to assign
NULL/empty to Y but I think that is far from true. If he's thinking
On 7/30/22 8:05 AM, Kerin Millar wrote:
What consideration was given to creating “local --unset *VAR*” or “unset
--local *VAR*” or some other equivalent that doesn't overload any existing
command form?
Obviously, only Chet can meaningfully respond to this. I mentioned the
existence of the opt
Hi Martin,
On Sat, 30 Jul 2022 11:47:01 +1000
Martin D Kealey wrote:
> On Fri, 29 Jul 2022 at 18:51, Kerin Millar wrote:
>
> > 5.0 added a localvar_unset option that impedes the behaviour of 'popping'
> > from the outermost scope.
I would have preferred for the sentence to have been quoted in
On Jul 30 2022, Martin D Kealey wrote:
> *2: Adding a new global setting just adds yet another unreasonably
> difficulty when sourcing files maintained by multiple authors into one
> shell script program.
It's not really different to the situation with perl or python. If you
use a perl or python
On Fri, 29 Jul 2022 at 18:51, Kerin Millar wrote:
> 5.0 added a localvar_unset option that impedes the behaviour of 'popping'
> from the outermost scope.
>
> $ bash -c 'x=foo; f1() { local x=bar; f2; x=baz; }; f2() { unset x;
> declare -p x; }; f1; declare -p x'
> declare -- x="foo"
> declare --
Hi Emanuele,
On Fri, 29 Jul 2022 03:59:07 +0200
Emanuele Torre wrote:
> Description:
> `bash' does not let `unset' fully undeclare local variables. (so that
> they can be used later as `local' variables without needing to
> redeclare them I assume.)
>
> bash-5.1$ x=abc; declare -p x
Thank you, Koichi and Greg.
I didn't notice that this was intended and documented. Also it is good
to know that `localvar_unset' exists.
Cheers.
2022年7月29日(金) 10:59 Emanuele Torre :
> Description:
> `bash' does not let `unset' fully undeclare local variables. (so that
> they can be used later as `local' variables without needing to
> redeclare them I assume.)
>
> [...]
>
> However, other functions are allowed to delete those v
On Fri, Jul 29, 2022 at 03:59:07AM +0200, Emanuele Torre wrote:
> This enables defininng a "really_unset" function like so:
>
> really_unset () { unset "$@" ;}
>
> Which may be useful I guess.
https://lists.gnu.org/archive/html/bug-bash/2010-05/msg00045.html
https://fvue.nl/wiki/Bash:
> It may be nice to also add a "force" option for `unset' that makes it
> actually unset the variable if it is `local'. Since this could be
> useful in some cases and it won't be possible after the behaviour is
> changed.
Clarification
I meant that it should fully undeclare local variables i
11 matches
Mail list logo