Skip to content

Instantly share code, notes, and snippets.

@pkutaj
Last active March 11, 2024 21:42
Show Gist options
  • Save pkutaj/c9088821edeb6f69158e7bc62a0ea0af to your computer and use it in GitHub Desktop.
Save pkutaj/c9088821edeb6f69158e7bc62a0ea0af to your computer and use it in GitHub Desktop.
NR Full Name Shortcut default Description
01 allexport -a off Export all variables to the environment when a new shell is started.
02 braceexpand -B on Enable brace expansion (e.g., {a,b} expands to a b).
03 emacs -e on Use Emacs-style line editing (default).
04 errexit -e off Exit immediately if any command fails (also known as "set -e").
05 errtrace -E off Trap errors in functions and subshells.
06 functrace -T off Enable function tracing (useful for debugging).
07 hashall -h on Remember the location of commands (used for faster command lookup).
08 histexpand -H on Enable history expansion (e.g., !command).
09 history -o on Enable command history (e.g., history -c clears history).
10 ignoreeof -i off Ignore Ctrl-D (EOF) as an exit signal (useful in interactive sessions).
11 interactive-comments -v on Allow comments in interactive mode (comments start with #).
12 keyword -k off Mark words following = as reserved keywords (e.g., if, while).
13 monitor -m on Enable job control monitoring (e.g., bg, fg, jobs).
14 noclobber -C off Prevent overwriting existing files with > redirection.
15 noexec -n off Read commands but do not execute them (useful for debugging).
16 noglob -f off Disable pathname expansion (globbing).
17 nolog -L off Disable logging of commands in the history file.
18 notify -b off Notify when background jobs complete (useful with wait).
19 nounset -u off Exit if unset variables are referenced (also known as "set -u").
20 onecmd -t off Exit after reading and executing one command (useful for scripts).
21 physical -P off Use the physical directory structure (resolve symlinks).
22 pipefail -o off Exit if any command in a pipeline fails (useful for error handling).
23 posix -o off Set POSIX-compatible mode (restricts some non-standard features).
24 privileged -p off Run in privileged mode (e.g., sudo bash).
25 verbose -v off Print shell input lines as they are read (useful for debugging).
26 vi -o off Use vi-style line editing (e.g., set -o vi).
27 xtrace -x off Print commands and their arguments as they are executed (also known as "set -x").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment