Created
July 2, 2014 06:16
-
-
Save jouyouyun/8b1123405b3cdb91d3da to your computer and use it in GitHub Desktop.
bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
# launch tmux | |
#test -z "$TMUX" && (tmux attach || tmux new-session) | |
#ls | |
alias ls='ls -hF --color=auto' | |
alias ll='ls -l' | |
alias la='ls -A' | |
alias lr='ls -R' | |
alias lz='ls -rS' #sort by size | |
alias lx='ls -BX' #sort by entension | |
alias lt='ls -rt' #sort by date | |
#modified commands | |
alias diff='colordiff' | |
alias grep='grep --color=auto' | |
alias du='du -c -h' | |
alias ping='ping -c 5' | |
alias ys='yaourt -Syua' | |
alias pacman='sudo pacman' | |
alias sshyun='ssh -qTfnN -D 7070 jouyouyun@216.194.70.6' | |
#Deepin | |
alias aptsearch='aptitude search' | |
alias aptinstall='sudo apt-get install' | |
alias aptupdate='sudo apt-get update' | |
alias aptgrade='sudo apt-get upgrade' | |
alias aptdistgrade='sudo aptitude dist-upgrade' | |
alias aptinstall='sudo aptitude install' | |
alias aptrm='sudo aptitude purge' | |
alias aptremove='sudo aptitude remove' | |
alias aptautorm='sudo apt-get autoremove' | |
alias aptclean='sudo apt-get clean' | |
PS1='\[\e[1;34m\]\W\[\e[m\]\[\e[m\]\[\e[0;32m\]$(__git_ps1 " (%s)")\[\033[1;35m\]->' | |
#PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\W\[\e[m\]\[\e[m\]\[\e[0;32m\]$(__git_ps1 " (%s)")\n\[\033[1;35m\]->' | |
#PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\W\[\e[m\] \[\e[0;31m\]\$\[\e[m\]\[\e[0;32m\]$(__git_ps1 " (%s)")' | |
#PS1='[\u@\h \W]\$ ' | |
#PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\] ' | |
#git | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
export GIT_PS1_SHOWSTASHSTATE=1 | |
export GIT_PS1_SHOWUNTRACKEDFILES=1 | |
export GIT_PS1_SHOWUPSTREAM="verbose git svn" | |
# safety features | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias rm='rm -I' # 'rm -i' prompts for every file | |
alias ln='ln -i' | |
alias chown='chown --preserve-root' | |
alias chmod='chmod --preserve-root' | |
alias chgrp='chgrp --preserve-root' | |
#privileged access | |
if [ $UID -ne 0 ] ; then | |
alias scat='sudo cat' | |
alias svi='sudo vim' | |
#alias scp='sudo cp' | |
alias srm='sudo rm' | |
alias smv='sudo mv' | |
alias reboot='sudo reboot' | |
alias halt='sudo halt' | |
fi | |
#latex | |
alias xelatex-make='xelatex -interaction=nonstopmode ' | |
#tmux | |
alias tmux='tmux -2' | |
alias pidfind='ps aux | grep' | |
#autocomplete | |
#complete -cf sudo | |
#complete -cf man | |
#complete -cf git | |
#Setup XIM environment | |
#export LC_CTYPE=zh_CN.UTF-8 | |
#export XMODIFIERS="@im=fcitx" | |
#export XMODIFIERS="@im=yong" | |
#export GTK_IM_MODULE=xim | |
#export QT_IM_MODULE=xim | |
#控制台切换英文 | |
if [ -z "$DISPLAY" ]; then | |
export LANG=en_US.UTF-8 | |
unset LANGUAGE | |
fi | |
#environment | |
#export PATH=$PATH | |
export LD_LIBRARY_PATH=/home/iwen/LinuxDeepin/SpeechCtrl/bin/i686:$LD_LIBRARY_PATH | |
#ARCH=`arch` | |
#if [ "x64_64"x == "$ARCH"x ] ; then | |
# export LD_LIBRARY_PATH=/home/iwen/Yunio/Deepin/SpeechCtrl/bin/x86_64:$LD_LIBRARY_PATH | |
#else | |
# export LD_LIBRARY_PATH=/home/iwen/Yunio/Deepin/SpeechCtrl/bin/i386:$LD_LIBRARY_PATH | |
#fi | |
#valgrind | |
alias valmem='valgrind --tool=memcheck --leak-check=full' | |
#hosts | |
alias hostsup='~/Public/updateHosts.sh' | |
#code_complete | |
alias ctags-prog='ctags -R --c-kinds=+p --fields=+S .' | |
#wkhtmltopdf | |
alias htmltopdf='wkhtmltopdf --use-xserver' | |
#udev reload | |
alias udevreload='sudo udevadm control --reload' | |
#在 vim 中启用ctrls+s | |
#alias vim="stty stop '' -ixoff ; vim" | |
#enable bash completion in interactive shells | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi | |
#Package | |
export DEBFULLNAME="jouyouyun" | |
export DEBEMAIL="jouyouwen717@gmail.com" | |
export EDITOR="vim" | |
export QUILT_PATCHES="debian/patches" | |
#zhcon | |
alias zhcon-utf8='zhcon --utf8 --drv=vga' | |
#Golang | |
export GOPATH=/Datas/GoLang | |
#终端彩色手册 | |
PAGER="/usr/bin/most -s" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment