I’ve got a zsh prompt string I’m trying to pass into the .zshrc file but it’s got a variable in the string which is causing problems. Here is the string;
PROMPT="(%F{magenta}%D{%d/%m/%y %H:%M:%S}%f) %F{cyan}%n%f@%F{cyan}%m%f in %F{2}%~%f %F{red}%#%f ‘’${vcs_info_msg_0_}>> "
I’ve tried putting a ‘‘ infront of the ${ which works but then zsh ignores it because it’s escaped.
Is there any other way to get the string as is through? It’s showing me some git information when I’m in a git directory.
Please use triple backticks around codeblocks (and put the triple backticks on their own line without any other code in there). The smart-quoting is confusing and unclear whether that’s due to discourse or what you actually typed in your config.
Thanks, based on that message it seems like you’re actually using an indented string. Does $vcs_info_msg_0_ cause any issues? Could you share the larger code block where this code is located?