-
Notifications
You must be signed in to change notification settings - Fork 1
/
bashrc
68 lines (52 loc) · 1.42 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
# Commands that should be applied only for interactive shells.
[[ $- == *i* ]] || return
HISTCONTROL=erasedups:ignorespace
HISTFILESIZE=100000
HISTSIZE=10000
HISTTIMEFORMAT="%F %T "
shopt -s histappend
shopt -s checkwinsize
shopt -s extglob
shopt -s globstar
shopt -s checkjobs
# Bash completion
[[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && source "/opt/homebrew/etc/profile.d/bash_completion.sh"
bind "set completion-ignore-case on"
bind "set show-all-if-ambiguous on"
# *** *** Tools *** ***
# asdf
if command -v brew >/dev/null 2>&1 && [ -f "$(brew --prefix asdf)/libexec/asdf.sh" ]; then
source "$(brew --prefix asdf)/libexec/asdf.sh"
fi
# GitHub CLI completion
if command -v gh >/dev/null 2>&1; then
eval "$(gh completion -s bash)"
fi
# fzf
if command -v fzf >/dev/null 2>&1 && [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
eval "$(fzf --bash)"
fi
# Direnv
if command -v direnv >/dev/null 2>&1; then
eval "$(direnv hook bash)"
fi
# Zoxide
if command -v zoxide >/dev/null 2>&1; then
eval "$(zoxide init bash)"
fi
# Atuin
if command -v atuin >/dev/null 2>&1; then
eval "$(atuin init bash)"
fi
# Starship
if command -v starship >/dev/null 2>&1 && [[ $TERM != "dumb" ]]; then
eval "$(starship init bash)"
PS1="$(/opt/homebrew/bin/starship prompt)"
fi
# *** *** Aliases *** ***
alias reload="source $HOME/.bashrc"
source "$HOME/.aliases"
# *** *** Functions *** ***
for file in ~/.functions/*.sh; do
source "$file"
done