-
Notifications
You must be signed in to change notification settings - Fork 17
/
bashrc
35 lines (27 loc) · 1.05 KB
/
bashrc
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
source "$HOME/dotfiles/mixins/general"
source "$HOME/dotfiles/mixins/asdf"
source "$HOME/dotfiles/mixins/functions"
source "$HOME/dotfiles/mixins/aliases"
source "$HOME/dotfiles/mixins/grep"
source "$HOME/dotfiles/mixins/path"
source "$HOME/dotfiles/mixins/man_color"
# Use asdf autocompletions
source "$HOME/.asdf/completions/asdf.bash"
# We need this so that tmux uses bash when started in a bash shell
export SHELL=/bin/bash
# Append to the history file, don't overwrite it
shopt -s histappend
# Keep all history
export HISTFILESIZE=
export HISTSIZE=
export HISTFILE=~/.bash_eternal_history
# Don't store duplicate commands and commands prefixed by a space
export HISTCONTROL=ignoreboth
# Also write history to files in the history/ directory
export PROMPT_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> $HOME/history/bash-history-$(date "+%Y-%m-%d").log; fi'
# Use vi mode
set -o vi
# Custom options
if [ -f "$HOME/dotfiles/mixins/shellrc.custom" ]; then
source "$HOME/dotfiles/mixins/shellrc.custom"
fi