summaryrefslogtreecommitdiff
path: root/.config/bashrc
blob: ec4790899fce28100d47cb6078f884f7345dd58e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# ~/.bashrc
#

## If not running interactively, don't do anything.
[[ $- != *i* ]] && return

## Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')"

## Keep the home directory tidy.
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"

# 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"