Get Function Into PS1 (Zsh)?
Fresh3 days ago
Mar 15, 202615560 viewsConfidence Score0%
0%
Problem
This works in ( is a defined function) But I cannot figure out the equivalent in . Note: If I do It seems to work, but in fact it's running the command when I set the prompt, which is not the point.
Error Output
export PS1="\$(parse_git_branch)"
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Get Function Into PS1 (Zsh)?
Low Risk
You have to include in your , explains it in the PROMPT EXPANSION section: If the PROMPT_SUBST option is set, the prompt string is first subjected to parameter expansion, command substitution and arithmetic expansion.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix