2016-09-28 08:29:44 +01:00
|
|
|
# shopt
|
|
|
|
|
|
|
|
> Manage Bash shell options: variables (stored in `$BASHOPTS`) that control behavior specific to the Bash shell.
|
|
|
|
> Generic POSIX shell variables (stored in `$SHELLOPTS`) are managed with the `set` command instead.
|
2021-11-02 16:38:44 +00:00
|
|
|
> More information: <https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html>.
|
2016-09-28 08:29:44 +01:00
|
|
|
|
|
|
|
- List of all settable options and whether they are set:
|
|
|
|
|
|
|
|
`shopt`
|
|
|
|
|
|
|
|
- Set an option:
|
|
|
|
|
|
|
|
`shopt -s {{option_name}}`
|
|
|
|
|
|
|
|
- Unset an option:
|
|
|
|
|
|
|
|
`shopt -u {{option_name}}`
|
|
|
|
|
|
|
|
- Print a list of all options and their status formatted as runnable `shopt` commands:
|
|
|
|
|
|
|
|
`shopt -p`
|
|
|
|
|
|
|
|
- Show help for the command:
|
|
|
|
|
|
|
|
`help shopt`
|