fix zsh config paths
This commit is contained in:
15
config/shared/zsh_config/prompt
Normal file
15
config/shared/zsh_config/prompt
Normal file
@@ -0,0 +1,15 @@
|
||||
# -----------------------------
|
||||
# Git prompt function
|
||||
# -----------------------------
|
||||
git_prompt_info() {
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
local branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
|
||||
echo " %F{green}($branch)%f"
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------
|
||||
# Set prompt
|
||||
# -----------------------------
|
||||
PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ '
|
||||
|
||||
Reference in New Issue
Block a user