-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc.alias
104 lines (87 loc) · 2.23 KB
/
.zshrc.alias
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
# ls
alias la="ls -a"
alias lf="ls -F"
alias ll="ls -l"
# process
# alias j="jobs -l"
alias 'ps?'='pgrep -l -f'
alias pk='pkill -f'
# du/df
alias du="du -h"
alias df="df -h"
alias duh="du -h ./ --max-depth=1"
# su
alias su="su -l"
# vim
alias 'src'='exec zsh'
alias -g V="| vim -"
# grep
alias 'gr'='grep --color=auto -RUIn'
#make
alias 'm'='make'
alias 'mn'='make native-code'
alias 'mc'='make clean'
# screen
alias s='screen -U'
alias sc='screen -S main'
alias sn='screen'
alias sl='screen -ls'
alias sr='screen -r main'
alias srr='screen -U -D -RR'
# tmux
alias tm='tmux'
alias tma='tmux attach'
alias tml='tmux list-window'
alias pon='predict-on'
alias poff='predict-off'
alias p='ping -c 4'
#alias ls='ls -al'
alias cp='nocorrect cp -irp'
alias refe='nocorrect refe'
# git
alias g='git'
alias gi='git'
alias oppai='git'
alias gs='git status'
alias gc='git commit'
alias gci='git commit -a'
alias '偽t'=git
alias java='nocorrect java'
alias cp='nocorrect cp -irp'
alias erl='nocorrect erl'
alias sbcl='nocorrect sbcl'
alias gosh='nocorrect gosh'
alias node='nocorrect node'
alias hg='nocorrect hg --encoding=utf-8'
# scala
alias scala='scala -deprecation -unchecked -explaintypes'
alias scc='scalac -deprecation -unchecked -explaintypes'
alias sci='scala -deprecation -unchecked -explaintypes -cp $SCALA_CLASSPATH -i ~/import.scala'
alias sce='scala'
# extract http://d.hatena.ne.jp/jeneshicc/20110215/1297778049
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.tar.xz) tar xvJf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*.lzma) lzma -dv $1 ;;
*.xz) xz -dv $1 ;;
*.jar) jar -xvf $1 ;;
*) echo "don't know how to extract '$1'..." ;;
esac
else
echo "'$1' is not a valid file!"
fi
}
alias ex='extract'
alias ev='vi ~/dotfiles/.vimrc*'