Open SturmB opened 6 years ago
I just checked, and this problem also appears no matter which color profile is chosen in macOS' Terminal.app. I also downloaded the latest agnoster.zsh-theme
and the problem is still showing when I open new terminal windows.
However, iTerm2 does not appear to have this issue. I can only speculate that I am missing some crucial setting in Terminal.app.
This is very annoying. Is there any way to get the correct color(s)?
I have the same problem. I have resorted to typing pwd
all the time to see which directory I'm in, but that's not really the best solution. I'm not sure what Terminal.app does different
This StackOverflow question and answers might hint at the problem: https://stackoverflow.com/questions/36221252/terminal-and-iterm2-same-profile-ansi-colors-look-differently
For now I've "solved" the issue by changing the default ansi color blue in Terminal.app. I've done that by clicking the blue color (top row, 5th from the left) in the Terminal.app color Profiles tab:
And then using the color picker to pick the color from the screen shot in this repo:
I'm using Oh-My-Zsh in Ubuntu 18.04 on Windows. I didn't find out a better solution but finally modified the theme itself.
vim ~/.oh-my-zsh/themes/agnoster.zsh-theme
Change the blue
color to whatever color supported by terminal,
For example, I changed it to 076
and it looks like
The problem is that I probably have to revert the change before I can update to a new oh-my-zsh version.
While this is still an issue, I've chosen to abandon the idea of using terminal.app
in favor of iTerm2
. I do, however, hope this bug (if it is a bug) gets resolved, though.
I have the same problem on the latest windows 10 WSL I use the following solution based on RickyLin, the color became perfect.
vi ~/.oh-my-zsh/themes/agnoster.zsh-theme change
prompt_dir() { prompt_segment blue $CURRENT_FG '%~' }
to prompt_dir() { prompt_segment 39d $CURRENT_FG '%~' }
For me this fixed it:
Go to Preferences > Profiles > Colors > Color Presents (on the bottom right) > Choose Solarized Dark
For me this fixed it:
Go to Preferences > Profiles > Colors > Color Presents (on the bottom right) > Choose
Solarized Dark
Thank you, it worked for me on Plasma / konsole :)
As I no longer use terminal.app
, I am unsubscribing to this issue. I've no idea if it's been resolved with the proposed fixes above, so I'm not sure if I should close this issue, either.
I have the same problem on the latest windows 10 WSL I use the following solution based on RickyLin, the color became perfect.
vi ~/.oh-my-zsh/themes/agnoster.zsh-theme change
prompt_dir() { prompt_segment blue $CURRENT_FG '%~' }
to prompt_dir() { prompt_segment 39d $CURRENT_FG '%~' }
Made this quicker by converting it to a single command:
sed -i '0,/blue/{s/blue/39d/}' ~/.oh-my-zsh/themes/agnoster.zsh-theme
Hey guys,
For terminal.app, use the solarized themes from this repository instead. It sets all of the colors correctly.
https://github.com/tomislav/osx-terminal.app-colors-solarized
for me what worked is changing the ansi colors blue and green (normal & bright) to the colors you want to be first-level & second level respectfully
To have the standard white text on dark background in Terminal.app modify the agnoster.zsh-theme by setting PRIMARY_FG=white (or PRIMARY_FG=FFF which if what I'm using), then change
prompt_context() {
local user=`whoami`
if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CONNECTION" ]]; then
prompt_segment $PRIMARY_FG default " %(!.%{%F{yellow}%}.)$user@%m "
fi
}
to
prompt_context() {
local user=`whoami`
if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CONNECTION" ]]; then
prompt_segment black $PRIMARY_FG " %(!.%{%F{yellow}%}.)$user@%m "
fi
}
I'm new to zsh so I don't know if this has side effects, but it seems to work just fine now.
Go to Preferences in iterm then Profile then select the dark blue color and make it any light color you want like teal
Agnoster doesn't work nicely with solarized dark, even with colors set correctly - context prompt hardcodes "black" color, which is very jarring:
I know I can change it to any value I want, but oh-my-zsh updates can break my changes. Also it would be nice if agnoster changed to white if SOLAROZED_THEME was set to light:
On Ubuntu standard terminal theme with oh-my-zsh installed and agnoster theme turned on in ~/.zshrc
I turned this:
into this:
by adding into the ~/.zshrc the following:
prompt_dir() {
# prompt_segment blue $CURRENT_FG '%~'
prompt_segment blue white '%~'
}
Found the snippet in the ~/.oh-my-zsh/themes/agnoster.zsh-theme, so also it could be edited there.
You can see the default agnoster value
prompt_segment blue $CURRENT_FG '%~'
is replaced by
prompt_segment blue white '%~'
I followed all of the instructions (or so I thought) to get
zsh
installed, as well asoh-my-zsh
and itsagnoster
theme. I also had to get the correctSolarized
color themes and install them intoterminal.app
, as well as thePowerline
fonts, includingMeslo
. Such a big process just to style upterminal
to make it look pretty.And yet, I must still be missing something.
For whatever reason, the directory part of the prompt is showing as dark blue with black text. This is happening for both the Solarized Dark and Solarized Light color themes, which makes me think that it isn't in those color themes themselves. Regardless of whether or not it is, how can I fix this issue, as it's clearly not correct?