diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-11-22 19:11:26 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-11-22 19:11:26 -0500 |
commit | 495aee441b75276e38c75694ccb455bb6463fdb9 (patch) | |
tree | f12907dbf62388e6c65dfa1c5e1199509936707e /builtins/setattr.def | |
parent | 30d188c2932d6ef609d894fefeb7e7b03ccff463 (diff) | |
download | android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.gz android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.bz2 android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.zip |
Bash-4.2 distribution sources and documentation
Diffstat (limited to 'builtins/setattr.def')
-rw-r--r-- | builtins/setattr.def | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtins/setattr.def b/builtins/setattr.def index 8b4cdf7..b3ca317 100644 --- a/builtins/setattr.def +++ b/builtins/setattr.def @@ -1,7 +1,7 @@ This file is setattr.def, from which is created setattr.c. It implements the builtins "export" and "readonly", in Bash. -Copyright (C) 1987-2009 Free Software Foundation, Inc. +Copyright (C) 1987-2010 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -82,7 +82,7 @@ export_builtin (list) $BUILTIN readonly $FUNCTION readonly_builtin -$SHORT_DOC readonly [-af] [name[=value] ...] or readonly -p +$SHORT_DOC readonly [-aAf] [name[=value] ...] or readonly -p Mark shell variables as unchangeable. Mark each NAME as read-only; the values of these NAMEs may not be @@ -433,11 +433,11 @@ show_var_attributes (var, pattr, nodefs) printf ("%s\n", var->name); else if (function_p (var)) printf ("%s\n", named_function_string (var->name, function_cell (var), FUNC_MULTILINE|FUNC_EXTERNAL)); - else if (invisible_p (var)) + else if (invisible_p (var) || var_isset (var) == 0) printf ("%s\n", var->name); else { - x = sh_double_quote (var_isset (var) ? value_cell (var) : ""); + x = sh_double_quote (value_cell (var)); printf ("%s=%s\n", var->name, x); free (x); } |