You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've been on a modified robbyrussell theme with the arrow removed for years, and then an update changed it back to standard robbyrussell. No biggie; I went in the theme file and saw this line: PROMPT="%(?:%{$fg_bold[green]%}%1{➜%} :%{$fg_bold[red]%}%1{➜%} ) %{$fg[cyan]%}%c%{$reset_color%}"
I didn't remember how I modified it last time, or the syntax used, but I decided to try truncating it to: PROMPT="%{$fg[cyan]%}%c%{$reset_color%}"
This almost achieved the desired result, except the directory name wasn't in bold. I asked Copilot why is that the case and why was the directory name bold before I truncated the prompt and it turned out the bold "leaked" from the arrow. And indeed when I removed the reset_color thing from the original prompt instead, my commands would become cyan and bold. For some reason, fg_bold overrides fg but there's no way to do it in the opposite direction other than resetting the colour.
To me this sounds like a hack and I had an urge to submit a PR to change it to PROMPT="%(?:%{$fg_bold[green]%}%1{➜%} :%{$fg_bold[red]%}%1{➜%} ) %{$fg_bold[cyan]%}%c%{$reset_color%}"
instead, so that the bolding is explicitly defined.
But I'm new to this and don't know if it's normal to use hacks like this in OMZ themes. If it is, I'll just leave it at that. But if not, I'd make a PR.
So, is it normal to rely on the bold leaking in OMZ themes? Or is it a robbyrussell specific issue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So I've been on a modified robbyrussell theme with the arrow removed for years, and then an update changed it back to standard robbyrussell. No biggie; I went in the theme file and saw this line:
PROMPT="%(?:%{$fg_bold[green]%}%1{➜%} :%{$fg_bold[red]%}%1{➜%} ) %{$fg[cyan]%}%c%{$reset_color%}"I didn't remember how I modified it last time, or the syntax used, but I decided to try truncating it to:
PROMPT="%{$fg[cyan]%}%c%{$reset_color%}"This almost achieved the desired result, except the directory name wasn't in bold. I asked Copilot why is that the case and why was the directory name bold before I truncated the prompt and it turned out the bold "leaked" from the arrow. And indeed when I removed the reset_color thing from the original prompt instead, my commands would become cyan and bold. For some reason, fg_bold overrides fg but there's no way to do it in the opposite direction other than resetting the colour.
To me this sounds like a hack and I had an urge to submit a PR to change it to
PROMPT="%(?:%{$fg_bold[green]%}%1{➜%} :%{$fg_bold[red]%}%1{➜%} ) %{$fg_bold[cyan]%}%c%{$reset_color%}"instead, so that the bolding is explicitly defined.
But I'm new to this and don't know if it's normal to use hacks like this in OMZ themes. If it is, I'll just leave it at that. But if not, I'd make a PR.
So, is it normal to rely on the bold leaking in OMZ themes? Or is it a robbyrussell specific issue?
Beta Was this translation helpful? Give feedback.
All reactions