Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用具有这些功能的 git 的 .bashrc 是什么。向您显示大量信息但不会阻止您查看终端或分散您注意力的东西。
我已经尝试过 Ultimate Bashrc 并且我喜欢它,但是我一直在寻找具有更多功能的东西。
它必须具备的条件:
此外,如果有一些东西可以与屏幕一起使用,以向您显示您当前所在的屏幕,并且所有打开的屏幕都将真正有助于提高工作效率。
我用它来告诉我我在哪个分支上。
function git_branch() { tmp=$? branch=`git branch 2> /dev/null | awk '/\*/ { print substr($0, 3); }'` if [ "X$branch" != "X" ]; then echo -n "$branch " fi exit $tmp } export PS1="\[\033[1;37m\]\$(git_branch)\[\033[0m\][\u@\h:\w]\$? \\$ "