some general config
alias o='open '
alias ll='ls -al'
alias cls='clear'
alias df='df -H'
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
some config for Xcode
alias om='open MDJStudy.xcodeproj'
the ping config
alias pb='ping www.baidu.com'
alias pt='ping www.taobao.com'
alias pg='ping www.google.com'
quick move folder setting
export MARKPATH=$HOME/.marks
function go {
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1"
}
function unmark {
rm -i "$MARKPATH/$1"
}
function marks {
\ls -l "$MARKPATH" | tail -n +2 | sed 's/ / /g' | cut -d' ' -f9- | awk -F ' -> ' '{printf "%-10s -> %s\n", $1, $2}'
}
function _completemarks {
reply=($(ls $MARKPATH))
}
compctl -K _completemarks go
compctl -K _completemarks unmark
网友评论