]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - doc/bashref.texi
changes for quoting special and multibyte characters in glob patterns; changes to...
[thirdparty/bash.git] / doc / bashref.texi
index 9f91dccb5bef9ddbb55aa084e784c342cffb7112..4aa9ed88c7ded9ab330ece4d325593ed62dfe32c 100644 (file)
@@ -2177,6 +2177,14 @@ If @var{parameter} is unset or null, the expansion of
 $ v=123
 $ echo $@{v-unset@}
 123
+$ echo $@{v:-unset-or-null@}
+123
+$ unset v
+$ echo $@{v-unset@}
+unset
+$ v=
+$ echo $@{v:-unset-or-null@}
+unset-or-null
 @end example
 
 @item $@{@var{parameter}:=@var{word}@}
@@ -5376,6 +5384,8 @@ parameters, or to display the names and values of shell variables.
 @example
 set [-abefhkmnptuvxBCEHPT] [-o @var{option-name}] [--] [-] [@var{argument} @dots{}]
 set [+abefhkmnptuvxBCEHPT] [+o @var{option-name}] [--] [-] [@var{argument} @dots{}]
+set -o
+set +o
 @end example
 
 If no options or arguments are supplied, @code{set} displays the names
@@ -5456,7 +5466,15 @@ This option is ignored by interactive shells.
 
 @item -o @var{option-name}
 
-Set the option corresponding to @var{option-name}:
+Set the option corresponding to @var{option-name}.
+If @option{-o} is supplied with no @var{option-name},
+@code{set} prints the current shell options settings.
+If @option{+o} is supplied with no @var{option-name},
+@code{set} prints a series of
+@code{set}
+commands to recreate the current option settings
+on the standard output.
+Valid option names are:
 
 @table @code
 @item allexport