-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshalias
42 lines (39 loc) · 1.51 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
# User specific aliases and functions
case "${OSTYPE}" in
darwin*)
alias gvim='env LANG=ja_JP.UTF-8 /Applications/MacVim.app/Contents/MacOS/Vim -g "$@"'
alias ls="ls -G -w"
alias top="top -o cpu"
alias rbenv='CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix)" RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv'
;;
linux*)
alias ls="ls --color"
alias rbenv='CONFIGURE_OPTS="--with-readline-dir=/usr/lib" rbenv'
alias pyenv='PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv'
;;
esac
alias ll='ls -l'
alias la='ls -al'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim -u ~/dotfiles/vim/lib/vimrc.basics'
alias v=vim
alias nvim='nvim -u $HOME/.vimrc'
alias view='vim -R'
alias whois=_whois
alias h=history
alias diff='diff --color'
alias grep='grep --color=auto'
alias info='info --vi-keys'
alias scala='scala -Dfile.encoding=UTF-8'
alias zsrc='source ~/.zshrc'
alias javac='javac -J-Dfile.encoding=UTF-8'
alias java='java -Dfile.encoding=UTF-8'
#alias jar='jar -Dfile.encoding=UTF-8'
alias ipgrep="grep -E '[0-9]{1,3}(\.[0-9]{1,3}){3}'"
alias tipy="tidy -xml -indent -q | pygmentize -l html"
alias gcf="git checkout --track \$(git branch -r | fzf)"
# following aliases from http://ruslanspivak.com/2010/06/02/urlencode-and-urldecode-from-a-command-line/
alias urlencode='python -c "import sys; from urllib.parse import quote; print(quote(sys.stdin.read()));"'
alias urldecode='python -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));"'