wyf9[Blog] 我的 Bash / CMD 提示符分享 中发帖

https://wyf9.top/p/bashrc-ps1 
Linux
完整版 (换行 , Git )
效果:
[图片]
# ~/.bashrc
# start prompt

# Function to get Git status indicators
parse_git_status() {
# Only run if in a Git repository
if git rev-parse --git-dir >/dev/null 2>&1; then
local status=""
# Get porcelain output for concise status
local git_status
git_status=$(git status --porcelain 2>/dev/null)

# Check ...