bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add missing docs for 'set +o', 'set -o'


From: Beer, Mathis
Subject: [PATCH] Add missing docs for 'set +o', 'set -o'
Date: Tue, 18 Jul 2023 13:29:43 +0000

Add documentation for 'set -o', 'set +o' syntax to 'help set', 'info'.
'set -o'/'set +o' matches the POSIX behavior, but Bash's own documentation 
should also mention it.
Phrasing is copied from the manpage, which already mentions it.
---
 builtins/set.def | 4 ++++
 doc/bashref.texi | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/builtins/set.def b/builtins/set.def
index 44f17691..b922ca97 100644
--- a/builtins/set.def
+++ b/builtins/set.def
@@ -114,6 +114,10 @@ Options:
           vi           use a vi-style line editing interface
 #endif /* READLINE */
           xtrace       same as -x
+      If -o is supplied with no option-name, the values of the
+      current options are printed. If +o is supplied with no
+      option-name, a series of set commands to recreate the current
+      option settings is displayed on the standard output.
   -p  Turned on whenever the real and effective user ids do not match.
       Disables processing of the $ENV file and importing of shell
       functions.  Turning this option off causes the effective uid and
diff --git a/doc/bashref.texi b/doc/bashref.texi
index b0dc2fad..99c2875e 100644
--- a/doc/bashref.texi
+++ b/doc/bashref.texi
@@ -5401,6 +5401,11 @@ This also affects the editing interface used for 
@code{read -e}.
 Same as @code{-x}.
 @end table
 
+If @code{-o} is supplied with no @var{option-name}, the values of the
+current options are printed. If @code{+o} is supplied with no
+@var{option-name}, a series of @code{set} commands to recreate the current
+option settings is displayed on the standard output.
+
 @item -p
 Turn on privileged mode.
 In this mode, the @env{$BASH_ENV} and @env{$ENV} files are not



reply via email to

[Prev in Thread] Current Thread [Next in Thread]