-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
80 lines (62 loc) · 2.09 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
export BROWSER='/mnt/c/Windows/explorer.exe'
shopt -s histappend
export HISTSIZE=5000
export HISTFILESIZE=5000
export HISTCONTROL="erasedups:ignoreboth"
export COREPACK_ENABLE_AUTO_PIN=0
LS_COLORS="$LS_COLORS:ow=30;42"
# Git completions / prompt:
GIT_COMPLETIONS=/usr/share/bash-completion/completions/git
[ -r $GIT_COMPLETIONS ] && source $GIT_COMPLETIONS
source ~/.dotfiles/scripts/git-prompt.sh
# Load other dotfiles:
source ~/.dotfiles/.aliases
source ~/.dotfiles/.bash_prompt
# .extra is an optional .gitignored file for local settings:
[ -r ~/.dotfiles/.extra ] && source ~/.dotfiles/.extra
# asdf
if [[ -s "$HOME/.asdf/asdf.sh" ]]; then
source "$HOME/.asdf/asdf.sh"
source "$HOME/.asdf/completions/asdf.bash"
fi
# atuin
ATUIN_COMPLETIONS=~/atuin.bash
[ -r $ATUIN_COMPLETIONS ] && source $ATUIN_COMPLETIONS
export ATUIN_CONFIG_DIR="$HOME/.dotfiles/atuin"
# batcat
export BAT_CONFIG_PATH="$HOME/.batcatrc"
# cheat
export CHEAT_USE_FZF=true
# fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
if [[ -x `which rg` ]]; then
export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --glob '!{node_modules,.git}'"
fi
# man
export MANPAGER="less -R --use-color -Dd+y -Du+208 -DN+r"
# n
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
export PATH="$N_PREFIX/bin:$PATH"
# Marker
if [[ -s "$HOME/.local/share/marker/marker.sh" ]]; then
export MARKER_KEY_GET="\C-x"
source "$HOME/.local/share/marker/marker.sh"
bind -x '"\emg1":"_marker_get"'
bind '"'"${MARKER_KEY_GET:-\C-X}"'":"\emg1"'
fi
# Rust
export PATH="$PATH:$HOME/.cargo/bin"
# Vagrant
export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
export PATH="$PATH:/mnt/c/Program Files/Oracle/VirtualBox"
# z
[ -r ~/bin/z.sh ] && source ~/bin/z.sh
# Allow z to use fzf when called without arguments:
unalias z 2> /dev/null
z() {
[ $# -gt 0 ] && _z "$*" && return
cd "$(_z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-* }" | sed 's/^[0-9,.]* *//')"
}
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
# Launch SSH agent:
source ~/.dotfiles/scripts/ssh.sh