-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
40 lines (32 loc) · 1.13 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
36
37
38
39
40
####################################################################################
#
# jmpargana's bashrc - requirements: fzf, ripgrep, fd, bat, exa
#
####################################################################################
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Launch tmux
if [[ $DISPLAY ]]; then
if which tmux >/dev/null 2>&1; then
test -z "$TMUX" && (tmux attach || tmux new-session)
fi
fi
# Use exa if available
if type exa > /dev/null 2>&1; then
alias ls="exa"
else
alias ls="ls --color"
fi
# Source all bash config files
[ -f "$HOME/.bash/funcs.sh" ] && source $HOME/.bash/funcs.sh
[ -f "$HOME/.bash/settings.sh" ] && source $HOME/.bash/settings.sh
# binds
bind '"\C-g":"cd_with_fzf\n"'
bind '"\C-o":"open_with_fzf\n"'
# Load aliases
[ -f "$HOME/.bash_aliases" ] && source $HOME/.bash_aliases
[ -d "$HOME/.cargo" ] && source "$HOME/.cargo/env"
# External dependencies
[ -d "/usr/share/fzf" ] && source /usr/share/fzf/key-bindings.bash
[ -d "/usr/share/fzf" ] && source /usr/share/fzf/completion.bash
[ -d "/usr/share/nvm" ] && source /usr/share/nvm/init-nvm.sh