Make a better BASH config¶
|Author:||Brant C. Faircloth|
|Copyright:||This documentation is available under a Creative Commons (CC-BY) license.|
Our HPC systems use BASH (without the option of installing ZSH). This is a bit of a bummer, but you can also make BASH more ZSH-like with a few changes.
- Downloand and install bash-it from github
Because we use conda environments on the HPC, in
While you are there, you may also want to add the following, which will give you prettier colors for``ls``:
And, finally, for
~/.bashrc, you may want your history to log more information and also to include time and date stamps. You can do that by adding the following, which gives you a time stamp for all commands, ingnores duplicates, records lots of history lines, and immediately appends those lines to your history, rather than doing so when you log out (the standard behavior):
# set my history preferences export HISTTIMEFORMAT="%m/%d/%y %T " export HISTCONTROL=ignoredups export HISTFILESIZE=1000000 export HISTSIZE=1000000 export PROMPT_COMMAND='history -a'
~/.inputrcwith the following contents - these changes let you use an anchor term and the up arrow to search backwards in history. For example, if you type
cdand hit the up arrow, you will search backwards in your history for all commands that start with
"\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on