From 059d68ae461685a9048c61be69cf8bdbfb76ac7e Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Sun, 14 Dec 2025 14:22:36 -0500 Subject: [PATCH] Finally simplified the build_prompt and fixed git status bugginess. --- zsh/themes/adlee.zsh-theme | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/zsh/themes/adlee.zsh-theme b/zsh/themes/adlee.zsh-theme index d269f1d..2edbc98 100644 --- a/zsh/themes/adlee.zsh-theme +++ b/zsh/themes/adlee.zsh-theme @@ -86,12 +86,19 @@ _adlee_format_user_host() { } # Format current directory with git info +#_adlee_format_directory() { +# local short_path="$(_adlee_get_short_path)" +# local git_info='$(git_prompt_info)'"${COLOR_GREY}" +# echo "${short_path}${git_info}" +#} + _adlee_format_directory() { local short_path="$(_adlee_get_short_path)" - local git_info='$(git_prompt_info)'"${COLOR_GREY}" - echo "${short_path}${git_info}" + # Remove the single quotes so it gets evaluated in the prompt + echo "${short_path}\$(git_prompt_info)${COLOR_GREY}" } + # ============================================================================ # COMMAND TIMER FUNCTIONS # ============================================================================ @@ -123,17 +130,23 @@ _adlee_format_elapsed_time() { # PROMPT BUILDING # ============================================================================ +#_adlee_build_prompt() { +# local user_host="$(_adlee_format_user_host)" +# local directory="$(_adlee_format_directory)" +# +# # Build top line: ┌[user@host]─[directory] +# local top_line="${COLOR_GREY}┌[${user_host}]─[${directory}]" +# +# print -P "${top_line}" +# +# # Set bottom line prompt character +# PROMPT="$(_adlee_get_prompt_char)" +#} +# + _adlee_build_prompt() { - local user_host="$(_adlee_format_user_host)" - local directory="$(_adlee_format_directory)" - - # Build top line: ┌[user@host]─[directory] - local top_line="${COLOR_GREY}┌[${user_host}]─[${directory}]" - - print -P "${top_line}" - - # Set bottom line prompt character - PROMPT="$(_adlee_get_prompt_char)" + PROMPT="${COLOR_GREY}┌[${COLOR_GREEN}%n@%m${COLOR_RESET}${COLOR_GREY}]─[${COLOR_YELLOW}%~${COLOR_RESET}${COLOR_GREY}\$(git_prompt_info)${COLOR_GREY}] +${COLOR_GREY}└${COLOR_BOLD}${COLOR_BLUE}%#${COLOR_RESET} " } # ============================================================================