An attempt at saner Bash defaults. Inspired by Tim Pope's sensible.vim.
Sensible Bash is intended to be a simple starting point for a better Bash user experience out of the box.
Refer to the commented source for a complete list of all the options with explanations. Here's a taste:
Readline bindings to improve on Bash's default tab completion:
Sensible defaults for the command history:
exit
, ls
, bg
, fg
, and history
itself)2016-04-09 13:06:31
)Read more about the settings used here in the article Better Bash History by Tom Ryder.
Options that considerably speed up the ability to navigate throughout the file system:
cd
to directory names automatically, so you can change to a directory just by typing its namecd
cd
command besides the current working directory (ex: projects
, repos
, documents
, etc)cd
into it from anywhere, kind of like a bookmarking system for Bash (cdable_vars
)You can copy sensible.bash
in your bashrc
, cherry-pick the options you like, or source the file at the top of your bashrc
:
if [ -f ~/bin/sensible.bash ]; then
source ~/bin/sensible.bash
fi
In order to get Sensible Bash to work correctly, make sure that:
echo $BASH_VERSION
).bashrc
from bash_profile
so to keep all your configuration in one place.