[Top][All Lists]

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

address@hidden doesn't work should no value be set

From: Michal Pesa
Subject: address@hidden doesn't work should no value be set
Date: Sat, 14 Jul 2018 21:10:45 +0200

Configuration Information:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
uname output: Linux pish-lub 4.15.0-23-generic #25-Ubuntu SMP Wed May 23
18:02:16 UTC 2018 x86_64 x86_6$
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.4
Patch Level: 19
Release Status: release

Hello, I would like to report a bug or rather a feature I think should be
implemented. The new parameter expansions address@hidden and address@hidden
don't work if only attributes are set but value is not. Demo:

$ declare -r foo
$ echo address@hidden address@hidden

$ declare -p foo #  output of @a @A should in my opinion match declare's
declare -r foo
$ declare -r bar=10
$ echo address@hidden address@hidden # outputs correctly
r declare -r bar='10'
$ declare -r var=
$ echo address@hidden address@hidden # setting an empty value is enough to get 
correct output
r declare -r var=''

The behavior is the same for arrays. Tested even on 5.5.0 alpha.

Thank you for your time.

reply via email to

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