Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Rompilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/home/nbah/share/locale'
-DPACKAGE='bash'
+-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2
uname output: Linux diocletien 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2
x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu
Bash Version: 4.3
Patch Level: 0
Release Status: release
Description:
$ var="foo bar"
$ declare -n nameref=var
$ echo "${!nameref} = $nameref"
var = foo bar
$ test -R nameref && echo ok || echo ko
bash: test: -R: unary operator expected
ko
Repeat-By:
$ test -R "nameref" && echo ok || echo ko
bash: test: -R: unary operator expected
ko
I hope I don't miss anything.
TIA