feat(zsh): add user and hostname to prompt

This commit is contained in:
mitchell 2026-07-11 17:03:50 -04:00
parent ae110cb076
commit b7424c9965

View file

@ -52,13 +52,13 @@ function set_prompt {
branch="$(git branch --show-current 2>/dev/null)" branch="$(git branch --show-current 2>/dev/null)"
if [[ "$PWD" == "$HOME" ]]; then if [[ "$PWD" == "$HOME" ]]; then
PROMPT="%F{magenta}%~%f $prompt_char " PROMPT="%F{magenta}%~%f %n@%m $prompt_char "
elif [[ "$branch" != '' ]]; then elif [[ "$branch" != '' ]]; then
PROMPT="%F{magenta}%~%f ($branch) PROMPT="%F{magenta}%~%f ($branch)
$prompt_char " %n@%m $prompt_char "
else else
PROMPT="%F{magenta}%~%f PROMPT="%F{magenta}%~%f
$prompt_char " %n@%m $prompt_char "
fi fi
} }
autoload -Uz add-zsh-hook autoload -Uz add-zsh-hook