mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
fix(jonathan): make compatible with Ghostty shell-integration (#13917)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
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.
This commit is contained in:
parent
076d692dac
commit
0912e05c05
1 changed files with 4 additions and 18 deletions
|
|
@ -102,25 +102,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Finally, the prompt.
|
# Finally, the prompt.
|
||||||
PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\
|
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_ULCORNER}${PR_HBAR}${PR_GREY}(\
|
${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} '
|
||||||
${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
|
# display exitcode on the right when > 0
|
||||||
return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})"
|
return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})"
|
||||||
RPROMPT=' $return_code${PR_CYAN}${PR_HBAR}${PR_BLUE}${PR_HBAR}\
|
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}'
|
||||||
(${PR_YELLOW}%D{%a,%b%d}${PR_BLUE})${PR_HBAR}${PR_CYAN}${PR_LRCORNER}${PR_NO_COLOUR}'
|
|
||||||
|
|
||||||
PS2='${PR_CYAN}${PR_HBAR}\
|
PS2='${PR_CYAN}${PR_HBAR}${PR_BLUE}${PR_HBAR}(${PR_LIGHT_GREEN}%_${PR_BLUE})${PR_HBAR}${PR_CYAN}${PR_HBAR}${PR_NO_COLOUR} '
|
||||||
${PR_BLUE}${PR_HBAR}(\
|
|
||||||
${PR_LIGHT_GREEN}%_${PR_BLUE})${PR_HBAR}\
|
|
||||||
${PR_CYAN}${PR_HBAR}${PR_NO_COLOUR} '
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue