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
’