-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshalias
58 lines (52 loc) · 1.38 KB
/
zshalias
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
# Typos
alias cd..="cd .."
alias dc="cd"
alias dc..="cd .."
alias sl="ls"
alias brwe="brew"
alias v.="v ."
# Abbreviations
alias g="git"
alias v="nvim"
alias vim="nvim"
alias bmake="bear make"
alias ipy="ipython"
alias py="python3"
alias py3="python3"
alias py2="python2"
alias jnb="jupyter notebook"
alias t="tree"
alias t1="tree -L 1"
alias t2="tree -L 2"
alias t3="tree -L 3"
alias t4="tree -L 4"
alias cdiff="colordiff"
alias vzsh="v ~/.zshrc"
alias szsh="source ~/.zshrc"
alias ssh='TERM=tmux-256color ssh'
if { [ "$OS" = "ubuntu" ]; }
then
# Ubuntu
alias normalize-chmod="sudo chmod -R 755 . && find . -type f -print0 | xargs -0 chmod 644"
alias hosts="sudo v /etc/hosts"
alias pip3="~/.conda/bin/pip"
alias upgrade_YCM="builtin cd $vim/bundle/YouCompleteMe && ./install.py --clang-completer --go-completer && builtin cd -"
alias upgrade_nvim='brew reinstall --HEAD neovim && upgrade_YCM'
fi
if { [ "$OS" = "macos" ]; }
then
# Mac OS
alias normalize-chmod="sudo chmod -R 755 . && find . -type f -print0 | xargs -0 chmod 644"
alias hosts="sudo v /etc/hosts"
fi
if { [ "$OS" = "android" ]; }
then
# Android
alias share="termux-share"
alias open="termux-share -d"
alias o="termux-share -d"
alias e="termux-share -action edit -d"
alias s="termux-share -action send -d"
alias clipboard="termux-clipboard-set"
alias brew="apt"
fi