0912e05c0589d26ea20d79555487900880aad4d5

Author
Marc Cornellà <marc@mcornella.com>
Committer
GitHub <noreply@github.com>
Date

Message

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.

Diff

This diff is truncated to protect this page.

 1diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme
 2index 5185ebf77d983c28e01f535124518c077af8a571..1e67f17a8b7b2951f2f17b4f696ebe373e0062a8 100644
 3--- a/themes/jonathan.zsh-theme
 4+++ b/themes/jonathan.zsh-theme
 5@@ -102,25 +102,11 @@ else
 6 fi
 7 
 8 # Finally, the prompt.
 9-PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\
10-${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\
11-${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\
12-${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)$(conda_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
13-${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\
14-${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\
15-
16-${PR_CYAN}${PR_LLCORNER}${PR_BLUE}${PR_HBAR}(\
17-${PR_YELLOW}%D{%H:%M:%S}\
18-${PR_LIGHT_BLUE}%{$reset_color%}$(git_prompt_info)$(git_prompt_status)${PR_BLUE})${PR_CYAN}${PR_HBAR}\
19-${PR_HBAR}\
20->${PR_NO_COLOUR} '