help-bash
[Top][All Lists]
Advanced

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

"set -r" and "set +o restricted"


From: Jin Xiang
Subject: "set -r" and "set +o restricted"
Date: Sat, 20 Nov 2021 16:17:20 -0500

In Bash Reference Manual's "Restricted Shell" section:
https://www.gnu.org/software/bash/manual/bash.html#The-Restricted-Shell
The last bullet point says:

   - Turning off restricted mode with ‘set +r’ or ‘set +o restricted’.

I am surprised to see the "+/- r" option in "set" built-in, because the
"set" section of the manual mentions neither "-r" nor "-o restricted":
https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin

I tested these options on bash 5.1.8 and found that "+/- r" is valid, but
"-o restricted" isn't.

If what I found is correct, the reference manual and manpage need the
following two changes:
1. Add "-r" in "set" section;
2. Change the bullet point that I quoted earlier into: "

   - Turning off restricted mode with ‘set +r’ or ‘shopt -u restricted_shell
   ’


reply via email to

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