centos ssh终端下高亮显示git分支名
来源:互联网 发布:如何找淘宝客 编辑:程序博客网 时间:2024/06/08 01:23
修改家目录下面的 .bash_profile添加下方代码
function find_git_branch { local dir=. head until [ "$dir" -ef / ]; do if [ -f "$dir/.git/HEAD" ]; then head=$(< "$dir/.git/HEAD") if [[ $head == ref:\ refs/heads/* ]]; then git_branch=" ${head#*/*/}" elif [[ $head != '' ]]; then git_branch=' (detached)' else git_branch=' (unknown)' fi return fi dir="../$dir" done git_branch=''} PROMPT_COMMAND="find_git_branch; $PROMPT_COMMAND"PS1="[\[$white\]\u@\h:\w\[$magenta\]\$git_branch\[$green\]\\[$normal_colours\] ]$ "
添加完成后 运行source .bash_profile
阅读全文
0 0
- centos ssh终端下高亮显示git分支名
- 在mac终端显示git分支
- XShell连接CentOS显示完整终端名
- centos下git分支状态显示配置
- 在Mac、Linux 终端显示 Git 当前所在分支
- 在Mac、Linux 终端显示 Git 当前所在分支
- 在Mac、Linux 终端显示 Git 当前所在分支
- 在Mac、Linux 终端显示 Git 当前所在分支
- 在Mac、Linux 终端显示 Git 当前所在分支
- Ubuntu上使终端显示Git分支(oh-my-zsh)
- 在Mac、Linux 终端显示 Git 当前所在分支
- 让terminal显示git所在的当前分支名
- 解决ssh终端CentOS后中文显示乱码
- GIT 自动补全命令,分支名 以及 高亮显示当前分支
- git 获取当前分支名
- CentOS终端显示乱码
- CentOS终端显示中文
- git终端生成ssh key
- angularjs 小经验
- 如何在文本框中添加提示信息
- better-scroll在vue项目中的使用
- AngularJs(七)--指令(三)
- APP引导界面实现
- centos ssh终端下高亮显示git分支名
- Echarts实时更新数据
- 分销系统如何加粉,三级分销政策,B2B2C分销规则
- 抽奖问题
- Illegal group reference"异常的分析
- YUV422 YUV420 Planar \ Semi-Planar \ Interleaved
- kotlin的变量和函数
- Java中的final,finally,finalize的区别
- B+Tree index structures in InnoDB