[Top][All Lists]

[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:
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":

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]