shell 提示符个性化设置
生活随笔
收集整理的這篇文章主要介紹了
shell 提示符个性化设置
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
提示符具體含義可參考: http://billie66.github.io/TLCL/book/zh/chap14.html
Ubuntu16.04個(gè)人配置如下,供以后查閱
1 function git_branch { 2 branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`" 3 if [ "${branch}" != "" ];then 4 if [ "${branch}" = "(no branch)" ];then 5 branch="(`git rev-parse --short HEAD`...)" 6 fi 7 echo " ($branch)" 8 fi 9 } 10 export PS1='\[\033[4;45m\]\u\[\033[00m\]@\h \[\033[01;36m\]\W\[\033[01;32m\]$(git_branch)\[\033[00m\]\$ '?
轉(zhuǎn)載于:https://www.cnblogs.com/liown/p/7383497.html
總結(jié)
以上是生活随笔為你收集整理的shell 提示符个性化设置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: h.264 rtp打包
- 下一篇: 【Sikuli】Sikuli 文档