-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile
114 lines (85 loc) · 3.15 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# ssh into dev vm and start a tmux session
alias dev="ssh dev -t 'tmux -CC'"
# print current branch
function gb() {
command git rev-parse --abbrev-ref HEAD
}
# push current upstream branch
function gpu() {
command git push --set-upstream origin `gb`
}
# checkout branch by grep
function gco() {
command git checkout `git branch | grep $1`
}
function gr() {
command git checkout master && git pull && git checkout - && git rebase master
}
function gssh() {
if [[ "$1" == "-p" ]] || [[ "$1" == "--production" ]]; then
env=production
elif [[ "$1" == "-s" ]] || [[ "$1" == "--staging" ]]; then
env=staging
elif [[ "$1" == "-i" ]] || [[ "$1" == "--integration" ]]; then
env=integration
fi
ip=`ssh $env govuk_node_list -c $2 --single-node`
command ssh $ip.$env
}
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
export PATH=$PATH:~/govuk/govuk-docker/exe
export PATH=$PATH:/usr/local/sbin
export PATH=$PATH:/Users/peterhartshorn/govuk/govuk-guix/bin
export EDITOR=vim
#export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
#export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
# Add go apps to path
export PATH=$PATH:$(go env GOPATH)/bin
# Path to the bash it configuration
export BASH_IT="/Users/peterhartshorn/.bash_it"
# Lock and Load a custom theme file
# location /.bash_it/themes/
export BASH_IT_THEME='Sexy'
# Add govuk-docker bin to PATH
#export PATH=$PATH:~/govuk/govuk-docker-run/bin
#export PATH=$PATH:~/govuk/govuk-docker/bin
# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
# export BASH_IT_REMOTE='bash-it'
# ctrl-s moves forward through search history
[[ $- == *i* ]] && stty -ixon
# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='[email protected]'
# Don't check mail when opening terminal.
unset MAILCHECK
# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'
# Set this to the command you use for todo.txt-cli
export TODO="t"
# Set this to false to turn off version control status checking within the prompt for all themes
export SCM_CHECK=true
# Set Xterm/screen/Tmux title with only a short hostname.
# Uncomment this (or set SHORT_HOSTNAME to something else),
# Will otherwise fall back on $HOSTNAME.
#export SHORT_HOSTNAME=$(hostname -s)
# Set Xterm/screen/Tmux title with only a short username.
# Uncomment this (or set SHORT_USER to something else),
# Will otherwise fall back on $USER.
#export SHORT_USER=${USER:0:8}
# Set Xterm/screen/Tmux title with shortened command and directory.
# Uncomment this to set.
#export SHORT_TERM_LINE=true
# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/djl/vcprompt
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
# (Advanced): Uncomment this to make Bash-it reload itself automatically
# after enabling or disabling aliases, plugins, and completions.
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
# Load Bash It
source "$BASH_IT"/bash_it.sh
eval "$(direnv hook bash)"