Hi,

I hope this is the right forum for reporting gettext bugs.

In my bash scripts I set "nounset" (and errexit) to prevent unset 
variables from being used. Using variables which might not be set is 
convenient in interactive shell sessions but dangerous in non-
interactive scripts.

Using...

    shopt -o -s errexit nounset
    source gettext.sh

...in a script results in:
/usr/bin/gettext.sh: line 43: ZSH_VERSION: unbound variable

...which refers to the following line in gettext.sh: "if test -z 
"$ZSH_VERSION"; then".

if [ x${ZSH_VERSION+set} = xset ]
    and
if [ -n "${ZSH_VERSION+x}" ]

portably test for the existence of a variable (tip from zsh mailing 
list)

While there is a workaround for this (first sourcing, then setting 
"nounset"), I'd still consider this a bug. Is this enough to qualify for 
a bug report?

Thorsten
gettext 0.18.1.1 on Gentoo Linux and on Cygwin


Reply via email to