码迷,mamicode.com
首页 > 系统相关 > 详细

Linux

时间:2014-10-30 00:09:29      阅读:286      评论:0      收藏:0      [点我收藏+]

标签:blog   io   ar   java   sp   div   on   log   cti   

 

.bashrc 

export MARKPATH=$HOME/.marks
function jump {
    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" | sed ‘s/  / /g‘ | cut -d‘ ‘ -f9- | sed ‘s/ -/\t-/g‘ && echo
}
_completemarks() {
  local curw=${COMP_WORDS[COMP_CWORD]}
  local wordlist=$(find $MARKPATH -type l -printf "%f\n")
  COMPREPLY=($(compgen -W ‘${wordlist[@]}‘ -- "$curw"))
  return 0
}
complete -F _completemarks jump unmark

.bashrc

export stdPath=/home/trace
153 export stdDate=`date +%Y%m%d%H`
154 export stdout=${stdPath}/s${stdDate}

  

 

Linux

标签:blog   io   ar   java   sp   div   on   log   cti   

原文地址:http://www.cnblogs.com/wzktravel/p/4060812.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!