bug-bash
[Top][All Lists]
Advanced

[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'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYP$
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

Description:
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
output
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 
the
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]