mirror of
https://github.com/mitchell/dotfiles.git
synced 2026-08-10 00:09:35 +00:00
feat(zsh): add user and hostname to prompt
This commit is contained in:
parent
ae110cb076
commit
b7424c9965
1 changed files with 3 additions and 3 deletions
|
|
@ -52,13 +52,13 @@ function set_prompt {
|
|||
branch="$(git branch --show-current 2>/dev/null)"
|
||||
|
||||
if [[ "$PWD" == "$HOME" ]]; then
|
||||
PROMPT="%F{magenta}%~%f $prompt_char "
|
||||
PROMPT="%F{magenta}%~%f %n@%m $prompt_char "
|
||||
elif [[ "$branch" != '' ]]; then
|
||||
PROMPT="%F{magenta}%~%f ($branch)
|
||||
$prompt_char "
|
||||
%n@%m $prompt_char "
|
||||
else
|
||||
PROMPT="%F{magenta}%~%f
|
||||
$prompt_char "
|
||||
%n@%m $prompt_char "
|
||||
fi
|
||||
}
|
||||
autoload -Uz add-zsh-hook
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue