openroc
2014-09-10 12:19:45 +08:00
share my aliases in .bashrc, :)
# some aliases
# different configurations for linux and mac
if [ `uname` == "Darwin" ]; then
alias ls='ls -G'
alias ss2='netstat -l -p tcp'
alias gg='open'
alias gvim='mvim'
alias ctags='/usr/local/bin/ctags'
else
alias ls='ls --color=auto'
alias ss2='ss -tunpl'
alias gvim='gvim -f'
# configure input method
input_method=fcitx
im-switch -s ${input_method}
if [ -n "${input_method}" ]; then
export GTK_IM_MODULE=${input_method}
export QT_IM_MODULE=${input_method}
export XMODIFIERS="@im=${input_method}"
export XIM=${input_method}
export XIM_PROGRAM=${input_method}
fi
# quick open
alias gg='nautilus'
fi
alias goshare='nautilus smb://share/'
alias gotemp='nautilus smb://share/temp'
alias ll='ls -lh'
alias la='ls -A'
alias l='ls -CF'
alias du='du -h'
alias df='df -h'
alias ps2='ps aux | grep'
alias history2='history | grep'
alias kill2='kill -9'
alias ip2='ifconfig | grep inet'
# tmux related
alias tmux="/usr/local/bin/tmux -2"
alias tmuxnew='tmux new -s'
alias attach='tmux attach -t'
# todo
alias ta='todo -a'
alias ta1='todo -p 1 -a'
alias ta2='todo -p 2 -a'
alias ta3='todo -p 3 -a'
alias ta4='todo -p 4 -a'
# rename sublime text
alias tt="sublime_text"
# quick apt related
alias ggupdate='sudo apt-get update'
alias ggupgrade='sudo apt-get upgrade'
alias gginstall='sudo apt-get install'