摘要: 编辑/etc/profile或者~/.bashrc 在行末添加如下内容# 获取git当前分支git_branch(){ branch='' cd $PWD if [ -d '.git' ]; then output=`git describe --contains --all HEAD|tr -s '\n'` if [ "$output" ]; then branch="(${output})" fi fi echo $branch}# linuxIPADDRS=`/sbin/ifconfig | g... 阅读全文
posted @ 2014-03-03 20:54 布雷泽 阅读(2785) 评论(0) 推荐(0) 编辑