invocation-option
Bash +O option
Disables the named shopt setting at invocation. With no option name, +O prints settings as shell commands; do not evaluate output supplied by an untrusted source. This fixture disables a normally enabled option explicitly. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): disabled.
Formal Syntax & Structure
bash syntaxbash
bash +O optionParameters & Attributes
| Name | Type | Description |
|---|---|---|
| option | string | Supported shopt option; fixture needs Bash 5.2. |
Return Value
exit status
See the example and command status; failures are nonzero.
Working Example
Example Snippetbash
bash --noprofile --norc +O globskipdots -c 'if shopt -q globskipdots; then exit 1; fi; printf "disabled\n"'