Bash configuration: Difference between revisions
From wikinotes
No edit summary |
|||
Line 12: | Line 12: | ||
= Set Options = | = Set Options = | ||
<blockquote> | <blockquote> | ||
* <code>-${flag}</code> set option | * <code>-${flag}</code> set option | ||
* <code>+${flag}</code> unset option | * <code>+${flag}</code> unset option |
Latest revision as of 13:06, 13 August 2021
Bash is configured in ~/.bashrc
. Any environment variables or functions you define here will be available in your interactive shell environment.
Documentation
set
docshttps://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin
Set Options
-${flag}
set option+${flag}
unset option# examples set -e `# exit if any pipe/command fails` \ set -o pipefail `# pipe exitcode is last pipe in pipeline to exit w/ failure` \vi mode
set -o vi bind -m vi-command 'Control-l: clear-screen' bind -m vi-insert 'Control-l: clear-screen'