Skip to content

Conversation

jyn514
Copy link
Contributor

@jyn514 jyn514 commented Mar 16, 2025

Subshells cause zsh to try and render their prompt. For reasons I do not entirely understand, zsh does not expand $PROMPT correctly in this case when PROMPT_SUBST is set.

Fortunately, using a brace group instead of a subshell is simple and has the same meaning.

Fixes #513

Subshells cause zsh to try and render their prompt. For reasons I do not
entirely understand, zsh does not expand `$PROMPT` correctly in this
case when PROMPT_SUBST is set.

Fortunately, using a brace group instead of a subshell is simple and has
the same meaning.
@Aloxaf
Copy link
Owner

Aloxaf commented Apr 9, 2025

nice catch

@Aloxaf Aloxaf merged commit 2b9882c into Aloxaf:master Apr 9, 2025
10 checks passed
@jyn514 jyn514 deleted the no-subshell branch April 9, 2025 05:39
njhoffman pushed a commit to njhoffman/fzf-tab that referenced this pull request May 14, 2025
Subshells cause zsh to try and render their prompt. For reasons I do not
entirely understand, zsh does not expand `$PROMPT` correctly in this
case when PROMPT_SUBST is set.

Fortunately, using a brace group instead of a subshell is simple and has
the same meaning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] $PROMPT is not quoted correctly when expanded
2 participants