-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
44 lines (33 loc) · 1.02 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
# Load exports and aliases
for file in $HOME/.{exports,aliases,functions,shell_extra}; do
[ -r "$file" ] && source "$file"
done
unset file
# Disable the per-terminal-session command history
export SHELL_SESSION_HISTORY=0
# Completions {{{
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
if [ -f ~/.sfconsole/console_completion.sh ]; then
source ~/.sfconsole/console_completion.sh
fi
# }}}
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
if [ -x "$(command -v kitty)" ]; then
source <(kitty + complete setup bash)
fi
# Load NVM completion
[[ -r $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion
# Bash specific aliases
alias reload=". $HOME/.bashrc && echo 'Bash config reloaded from $HOME/.bashrc'"
detect-dark-mode
# Calls the function before each command
trap load-nvmrc DEBUG
trap detect-dark-mode DEBUG
# Initialise Starship, must be called after trap
eval "$(starship init bash)"
# Lastly the direnv hook
if type direnv &> /dev/null; then
eval "$(direnv hook bash)"
fi