-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc.osx
99 lines (74 loc) · 2.52 KB
/
.zshrc.osx
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
export PATH=/usr/local/bin:/usr/local/sbin:~/bin:$PATH
# osx alias
alias pbc='pbcopy'
# Terminal Colorの設定
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# vim
export EDITOR=/Applications/MacVim.app/Contents/MacOS/Vim
alias vi='env LANG=ja_JP.UTF-8 /Applications/MacVim.app/Contents/MacOS/Vim "${@[1,${#@}]}"'
alias vim='env LANG=ja_JP.UTF-8 /Applications/MacVim.app/Contents/MacOS/Vim "$@"'
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home
# GNU command
brew_prefix=$(brew --prefix coreutils)
alias base64="$brew_prefix/bin/gbase64"
alias basename="$brew_prefix/bin/gbasename"
alias cat="$brew_prefix/bin/gcat"
alias chcon="$brew_prefix/bin/gchcon"
alias chgrp="$brew_prefix/bin/gchgrp"
alias chmod="$brew_prefix/bin/gchmod"
alias chown="$brew_prefix/bin/gchown"
alias date="$brew_prefix/bin/gdate"
unset brew_prefix
alias brew_batch="brew update && brew upgrade --all && brew cleanup --force"
### golang
export GOROOT=/usr/local/Cellar/go/1.7/libexec
export GOPATH=${HOME}/local/scripts/golang
export PATH=$PATH:/usr/local/opt/go/libexec/bin:/usr/local/opt/go/bin:${GOROOT}/bin:${GOPATH}/bin
if [ -d "${GOPATH}" ]; then
alias gopath="cd ${GOPATH}"
fi
## git-flowの補完
source ~/.zsh-tools/git-flow-completion/git-flow-completion.plugin.zsh
## 自分用関数のための環境変数
BLOG_HOME=~/local/blog
export powerline_symbols=~/.font/powerline-symbols.sfd
export PGDATA=/usr/local/var/postgres
## local固有設定
#
[ -f ~/.zshrc.local ] && source ~/.zshrc.local
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
[[ -s /Users/sgyk/.nvm/nvm.sh ]] && . /Users/sgyk/.nvm/nvm.sh # This loads NVM
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export SCALATRA_JREBEL=~/bin/jrebel.jar
## java
export JAVA_HOME=$(/usr/libexec/java_home)
# gem
export PATH=/Users/jp20404/.gem/ruby/2.1.0/bin:${PATH}
# android
export ANDROID_HOME=/Users/jp20404/local/scripts/android/android-sdk-macosx
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
function memo(){
local mid=
if [ $# -gt 0 ]; then
mid="$1"
shift
fi
local dir="${HOME}/local/memo"
if [ ! -d ${dir} ]; then
mkdir -pv ${MEMO_DIR}
fi
local filename=${dir}/$(date '+%Y%m%d')
if [ ! -z "${mid}" ]; then
filename=${filename}_${mid// /-}
fi
for i in $(seq 1 100)
do
if [ ! -f ${filename}.md ]; then
break
fi
filename=${filename}_$(printf "%03d" ${i})
done
vim ${filename}.md
}