-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbash_profile
More file actions
52 lines (41 loc) · 1.47 KB
/
Copy pathbash_profile
File metadata and controls
52 lines (41 loc) · 1.47 KB
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
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
set -o vi
alias ascii="man ascii | col -b | grep -A 55 'The octal set'"
alias be="bundle exec"
alias ber="bundle exec ruby"
alias berc="bundle exec rails c"
alias brb='/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine'
alias clear="osascript -e 'if application \"Terminal\" is frontmost then tell application \"System Events\" to keystroke \"k\" using command down'"
alias g=git
alias gs="git status"
alias mou="open -a Mou"
alias mvi=mvim
alias mvidiff="mvimdiff"
alias tree='tree -I node_modules'
alias utcdate='TZ=utc date'
# pretty print json
alias jsontool='python -m json.tool'
export EDITOR=vim
export VISUAL=vim
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# powerline
powerline-daemon -q
function _update_ps1() {
PS1="$(~/powerline-shell.py --colorize-hostname $? 2>/dev/null)"
}
[ "$TERM" != "linux" ] && {
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
}
# ssh tab completion
complete -o default -o nospace -W "$(gawk '/^\s*Host\s+[^*?]/ { sub(/^\s*Host\s+/, ""); gsub(/\s+/, "\n"); print }' $HOME/.ssh/config)" scp sftp ssh
# tmuxinator tab completion
complete -o default -o nospace -W "$(cd $HOME/.tmuxinator; ls -1 | sed -e 's/\.yml$//')" mux
# functions
cdp () {
TEMP_PWD=`pwd`
while ! [ -d .git ]; do
cd ..
done
OLDPWD=$TEMP_PWD
unset TEMP_PWD
}