diff options
| -rw-r--r-- | .config/bashrc | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/.config/bashrc b/.config/bashrc index 1207f13..ec47908 100644 --- a/.config/bashrc +++ b/.config/bashrc @@ -2,16 +2,35 @@ # ~/.bashrc # -# If not running interactively, don't do anything. +## If not running interactively, don't do anything. [[ $- != *i* ]] && return -# Adds `~/.local/bin` to $PATH +## Adds `~/.local/bin` to $PATH export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')" -# Keep the home directory tidy. +## Keep the home directory tidy. export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" -# Load aliases if they exist. +# Configure bash history + +## Where the bash history file is saved +HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/bash_history" + +## Don't put duplicate lines or lines starting with space in the history. +HISTCONTROL=ignoreboth + +## Append to the history file, don't overwrite it +shopt -s histappend + +## The number of commands to remember in the command history. +HISTSIZE=1000 + +## The maximum number of lines contained in the history file +HISTFILESIZE=2000 + +# Source extra files. + +## Load aliases if they exist. [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" |
