-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
38 lines (30 loc) · 851 Bytes
/
.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
36
37
38
[[ $- != *i* ]] && return
# aliases
alias bx="bundle exec"
alias dotfiles="command git --git-dir=$HOME/.dotfiles/ \
--work-tree=$HOME"
alias hist="rg . ~/.bash_history | fzy -l 5 | xargs '\n' bash -ic"
alias rg="rg -A 3 -B 3"
# colours
export TERM=screen-256color
# history
HISTCONTROL=erasedups:ignoreboth
HISTFILESIZE=-1
HISTSIZE=-1
export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear"
export PROMPT_COMMAND="history -a"
shopt -s cmdhist
shopt -s histappend
shopt -s globstar
# bindings
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
bind '"\C-r": "hist \C-j"'
bind '"\e[C": forward-char'
bind '"\e[D": backward-char'
bind '"\t": menu-complete'
bind '"\e[Z": menu-complete-backward'
bind '"\C-t": complete'
set show-all-if-unmodified on
# prompt
source ~/.config/bash/prompt.sh