Bash configuration

From wikinotes

Bash is configured in ~/.bashrc. Any environment variables or functions you define here will be available in your interactive shell environment.


set docs

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'