Skip to main content
4 of 4
spelling, add link to man page, formatting
Matthias Braun
  • 8.8k
  • 8
  • 51
  • 63

How can I list Bash's options for the current shell?

The Bash interpreter itself has options.

For example, those mentioned on lines 22-23 of Bash's man page:

OPTIONS
All of the single-character shell options documented in the description of the set builtin command can be used as options when the shell is invoked. In addition, bash interprets the following options when it is invoked:
-c ...
-i ...
-l ...
-r ...

I've used a few search patterns in Bash's man page like:

  • /^\s*set
  • /list

Is it possible to print a list of these settings that are applied to the current shell?

the_velour_fog
  • 12.8k
  • 17
  • 73
  • 115