diff --git a/dot/config/fish/functions/fish_prompt.fish b/dot/config/fish/functions/fish_prompt.fish index c0ef9d3..faebeb3 100644 --- a/dot/config/fish/functions/fish_prompt.fish +++ b/dot/config/fish/functions/fish_prompt.fish @@ -48,6 +48,12 @@ function fish_prompt --description 'Write out the prompt' end end + if test $CMD_DURATION -gt 5000 + __need_space + echo -n -s $CMD_DURATION 'ms' + set -g __need_space true + end + set -g __need_space '' echo -n -s "$suffix " diff --git a/dot/config/fish/functions/fish_right_prompt.fish b/dot/config/fish/functions/fish_right_prompt.fish index 4fcb051..d1516db 100644 --- a/dot/config/fish/functions/fish_right_prompt.fish +++ b/dot/config/fish/functions/fish_right_prompt.fish @@ -20,10 +20,6 @@ function fish_right_prompt echo -n -s (set_color $color_cwd) (prompt_pwd) (set_color normal) - if test $CMD_DURATION -gt 5000 - echo -n -s ' ' $CMD_DURATION 'ms' - end - __show_only_git_branch end