-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
60 lines (39 loc) · 1.14 KB
/
.bash_aliases
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
# coding: utf-8
## directory traversings
alias ..='cd ..'
alias ..2='cd ../..'
alias ..3='cd ../../..'
alias groot='cd $(git rev-parse --show-toplevel)'
# peco
if type "peco" >/dev/null 2>&1; then
# ghq
if type "ghq" >/dev/null 2>&1; then
## search repository
alias c='cd $(ghq list -p | peco)'
fi
fi
# by env
case `uname -s` in
"Darwin" )
## colored ls
alias ls='ls -G'
## MacVim Kaoriya
if [ -f "/Applications/MacVim.app/Contents/MacOS/Vim" ]; then
alias vi=' env LANG=ja_JP.UTF-8 /Applications/MacVim.app/Contents/MacOS/Vim "$@"'
alias vim='env_LANG=ja_JP.UTF-8 /Applications/MacVim.app/Contents/MacOS/Vim "$@"'
fi
## hardware info
# The list of informations could be retrieve via:
# $ system_profiler -listDataTypes
alias hwinfo='system_profiler SPHardwareDataType'
;;
"Linux" )
## colored ls
alias ls='ls --color'
## want to use pbcopy on linux
if type xsel >/dev/null 2>&1; then
alias pbcopy='xsel --clipboard --input'
fi
;;
esac
# vim: ft=sh