Terminal で git の branch 名を表示
Aim
ブランチ名をプロンプトに表示
Ubuntu
bash の設定ファイルに追加
code: zshr
PS1='${debian_chroot:+($debian_chroot)}\[\03301;32m\\u@PC4\[\03300m\:\[\03301;34m\\w\[\03300m\$(__git_ps1 "(%s)")\$ ' else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
macOS + zprezto
zsh の設定ファイルに追加
code:zoreztorc
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'directory' \
'spectrum' \
'utility' \
'completion' \
'syntax-highlighting' \ #追加 'prompt'
# Autosuggestions の設定,
zstyle ':prezto:module:autosuggestions:color' found 'fg=234'
Date :2023/3/27
Modified Date :
Author :lattice.icon