-
Notifications
You must be signed in to change notification settings - Fork 2
/
.bash_profile
74 lines (60 loc) · 2.07 KB
/
.bash_profile
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
#!/bin/bash
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# include .bash_aliases if it exists
if [ -f ~/.bash_aliases ]; then
source ~/.bash_aliases
fi
# include .bash_private if it exists
if [ -f ~/.bash_private ]; then
source ~/.bash_private
fi
# include .bash_secret if it exists
if [ -f ~/.bash_secret ]; then
source ~/.bash_secret
fi
export BASH_SILENCE_DEPRECATION_WARNING=1
# https://unix.stackexchange.com/a/124447
pathupdate() { case ":${PATH:=$1}:" in *:"$1":*) ;; *) PATH="$1:$PATH" ;; esac; }
# Ordered form least to most specific (because this is a stack)
pathupdate "$HOME/.jenv/bin"
pathupdate "$HOME/.dotfiles/bin"
pathupdate "$HOME/.dotfiles/bin-private"
pathupdate "/Volumes/git/palantir/oss/git-filter-repo"
pathupdate "/Volumes/git/palantir/oss/git-relevant-history"
# Allows endpoint engineering to curate certain binary overrides
pathupdate "/Library/Palantir/bin"
# intentionally elided due to some issues with GPG version conflicts
# pathupdate "/opt/homebrew/bin"
if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then
__GIT_PROMPT_DIR=$(brew --prefix)/opt/bash-git-prompt/share
source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh"
fi
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
eval "$(mcfly init bash)"
export MCFLY_FUZZY=2
export EDITOR='nvim'
export BAT_THEME='Solarized (dark)'
export PAGER='less'
export LESS='-RSFX --mouse --wheel-lines=3'
# Allows GPG to create TUI's in certain scenarios
GPG_TTY=$(tty)
export GPG_TTY
# Reminders
echo "New git commands:"
echo " wdiff - subline diffing"
echo " find - find by regex in history"
echo " staash - stash plus untracked"
echo " shame - historical blame, tracks moves and original author"
echo " flog - reflog scoped to a single file"
echo "New aliases:"
echo " nb - create branch with name"
echo "New workflows:"
echo " git commit --fixup=<commit>; git rebase --autosquash"