Skip to content

Commit 0a92b02

Browse files
Move user@host to beginning of prompt (sindresorhus#530)
1 parent 30fa78f commit 0a92b02

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pure.zsh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ prompt_pure_preprompt_render() {
137137
# Initialize the preprompt array.
138138
local -a preprompt_parts
139139

140+
# Username and machine, if applicable.
141+
[[ -n $prompt_pure_state[username] ]] && preprompt_parts+=($prompt_pure_state[username])
142+
140143
# Set the path.
141144
preprompt_parts+=('%F{${prompt_pure_colors[path]}}%~%f')
142145

@@ -158,8 +161,6 @@ prompt_pure_preprompt_render() {
158161
preprompt_parts+=('%F{$prompt_pure_colors[git:stash]}${PURE_GIT_STASH_SYMBOL:-≡}%f')
159162
fi
160163

161-
# Username and machine, if applicable.
162-
[[ -n $prompt_pure_state[username] ]] && preprompt_parts+=($prompt_pure_state[username])
163164
# Execution time.
164165
[[ -n $prompt_pure_cmd_exec_time ]] && preprompt_parts+=('%F{$prompt_pure_colors[execution_time]}${prompt_pure_cmd_exec_time}%f')
165166

0 commit comments

Comments
 (0)