ubuntuのPS1にgitのブランチを表示
.bashrcに以下を追記
code:.bashrc
. ~/.bashrc_custom
~/.bashrc_custom
を作成
code:sh
if
-f /etc/bash_completion
; then
. /etc/bash_completion
fi
if
-f /etc/bash_completion.d/git-prompt
; then
export PS1='\[\033
01;32m\
\u@\h:\033
01;33m\
\w\[\033
01;34m\
$(__git_ps1)\[\033
00m\
:\$ '
else
export PS1='\[\033
01;32m\
\u@\h:\033
01;33m\
\w\\$ '
fi
ーーー
2025/6/4 14:27
original:
/tomiokario-close/ubuntuのPS1にgitのブランチを表示