-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
58 lines (45 loc) · 2 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
#!/usr/bin/env bash
eval "$(/opt/homebrew/bin/brew shellenv)"
# Load the shell dotfiles, and then some:
for file in $HOME/.{bash_prompt,exports,aliases,functions,iterm2}; do
[ -r "$file" ] && source "$file"
done
unset file
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
# Append to the Bash history file, rather than overwriting it
# this needs some fixing w multiple shells but it isnt making me angry atm
# https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows
shopt -s histappend
# Autocorrect typos in path names when using `cd`
shopt -s cdspell
# Add tab completion for `defaults read|write NSGlobalDomain`
# You could just use `-g` instead, but Sam likes being explicit
complete -W "NSGlobalDomain" defaults
# If possible, add tab completion for these things
brewery=$(brew --prefix)
[[ -s $brewery/etc/profile.d/bash_completion.sh ]] && source $brewery/etc/profile.d/bash_completion.sh
[[ -s $brewery/opt/fzf/shell/completion.bash ]] && source $brewery/opt/fzf/shell/completion.bash
[[ -s $brewery/opt/fzf/shell/key-bindings.bash ]] && source $brewery/opt/fzf/shell/key-bindings.bash
# and these things
for file in $brewery/etc/bash_completion.d/*; do
[ -r "$file" ] && source "$file"
done
unset file
# https://github.com/cykerway/complete-alias
[ -r "$HOME/src/complete-alias/complete_alias" ] && source "$HOME/src/complete-alias/complete_alias"
# ~/.bashrc.local can be used for other settings you don’t want to commit.
if [ -f $HOME/.bashrc.local ]; then
source $HOME/.bashrc.local
fi
# https://github.com/pyenv/pyenv-virtualenv#installing-with-homebrew-for-macos-users
# if type pyenv &> /dev/null; then
# eval "$(pyenv virtualenv-init -)"
# fi
export LDFLAGS="-L$(brew --prefix)/opt/libffi/lib"
export CPPFLAGS="-I$(brew --prefix)/opt/libffi/include"
export PKG_CONFIG_PATH="$(brew --prefix)/opt/libffi/lib/pkgconfig"
export PATH="/opt/homebrew/bin:$PATH"
# are you happy now?
eval "$(direnv hook bash)"
source "$HOME/.bootstrap/env.sh"