From 0912e05c0589d26ea20d79555487900880aad4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Thu, 6 Aug 2026 09:20:53 +0200 Subject: [PATCH] fix(jonathan): make compatible with Ghostty shell-integration (#13917) The issue is that Ghostty shell-integration tries to parse PS1. How we're defining it now, the precmd function from Ghostty does not properly read the newlines, resulting in broken prompts. This doesn't happen if: - Zsh is reloaded (`omz reload` or `exec zsh`) - Ghostty shell integration is disabled (`shell-integration = none` in config) This fix just removes the newlines, and it's enough to fix the integration. --- themes/jonathan.zsh-theme | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme index 5185ebf77..1e67f17a8 100644 --- a/themes/jonathan.zsh-theme +++ b/themes/jonathan.zsh-theme @@ -102,25 +102,11 @@ else fi # Finally, the prompt. -PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\ -${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\ -${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\ -${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)$(conda_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\ -${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\ -${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\ - -${PR_CYAN}${PR_LLCORNER}${PR_BLUE}${PR_HBAR}(\ -${PR_YELLOW}%D{%H:%M:%S}\ -${PR_LIGHT_BLUE}%{$reset_color%}$(git_prompt_info)$(git_prompt_status)${PR_BLUE})${PR_CYAN}${PR_HBAR}\ -${PR_HBAR}\ ->${PR_NO_COLOUR} ' +PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(${PR_GREEN}%${PR_PWDLEN}<...<%~%<<${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)$(conda_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER} +${PR_CYAN}${PR_LLCORNER}${PR_BLUE}${PR_HBAR}(${PR_YELLOW}%D{%H:%M:%S}${PR_LIGHT_BLUE}%{$reset_color%}$(git_prompt_info)$(git_prompt_status)${PR_BLUE})${PR_CYAN}${PR_HBAR}${PR_HBAR}>${PR_NO_COLOUR} ' # display exitcode on the right when > 0 return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})" -RPROMPT=' $return_code${PR_CYAN}${PR_HBAR}${PR_BLUE}${PR_HBAR}\ -(${PR_YELLOW}%D{%a,%b%d}${PR_BLUE})${PR_HBAR}${PR_CYAN}${PR_LRCORNER}${PR_NO_COLOUR}' +RPROMPT=' $return_code${PR_CYAN}${PR_HBAR}${PR_BLUE}${PR_HBAR}(${PR_YELLOW}%D{%a,%b%d}${PR_BLUE})${PR_HBAR}${PR_CYAN}${PR_LRCORNER}${PR_NO_COLOUR}' -PS2='${PR_CYAN}${PR_HBAR}\ -${PR_BLUE}${PR_HBAR}(\ -${PR_LIGHT_GREEN}%_${PR_BLUE})${PR_HBAR}\ -${PR_CYAN}${PR_HBAR}${PR_NO_COLOUR} ' +PS2='${PR_CYAN}${PR_HBAR}${PR_BLUE}${PR_HBAR}(${PR_LIGHT_GREEN}%_${PR_BLUE})${PR_HBAR}${PR_CYAN}${PR_HBAR}${PR_NO_COLOUR} '