From 0a92b02dd4172f6c64fdc9b81fe6cd4bddb0a23b Mon Sep 17 00:00:00 2001 From: Jonathan Simon Date: Thu, 20 Feb 2020 14:18:37 -0500 Subject: [PATCH] Move user@host to beginning of prompt (#530) --- pure.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pure.zsh b/pure.zsh index 75b76201..90093d9e 100644 --- a/pure.zsh +++ b/pure.zsh @@ -137,6 +137,9 @@ prompt_pure_preprompt_render() { # Initialize the preprompt array. local -a preprompt_parts + # Username and machine, if applicable. + [[ -n $prompt_pure_state[username] ]] && preprompt_parts+=($prompt_pure_state[username]) + # Set the path. preprompt_parts+=('%F{${prompt_pure_colors[path]}}%~%f') @@ -158,8 +161,6 @@ prompt_pure_preprompt_render() { preprompt_parts+=('%F{$prompt_pure_colors[git:stash]}${PURE_GIT_STASH_SYMBOL:-≡}%f') fi - # Username and machine, if applicable. - [[ -n $prompt_pure_state[username] ]] && preprompt_parts+=($prompt_pure_state[username]) # Execution time. [[ -n $prompt_pure_cmd_exec_time ]] && preprompt_parts+=('%F{$prompt_pure_colors[execution_time]}${prompt_pure_cmd_exec_time}%f')