zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.79k stars 1.85k forks source link

Ubuntu 20.4 terminal the suggestion text color is the same as terminal tex #560

Open imaqsood opened 4 years ago

imaqsood commented 4 years ago

Ubuntu 20.4 terminal the suggestion text color is the same as terminal text

To Reproduce

freshly installed zsh, oh_my_zsh, and added zsh-autosuggestions plugin

if I do this It's working fine.

% zsh -df
% source path/to/zsh-autosuggestions.zsh

Screenshot from 2020-08-16 19-48-15

Expected behavior

default color should be dark gray

Screenshots

Screenshot from 2020-08-16 19-45-34

Desktop

Additional context

Thank you

astroanax commented 3 years ago

Same thing happens to me with tmux Screenshot from 2020-09-11 12-55-23

alefontani commented 3 years ago

Check with the command echotc Co, "it indicates a limit on the number of colours which will be enforced by the line editor." (cit).

If it return 8 you can use only black, red, green, yellow, blue, magenta, cyan and white as foreground colors in ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE variable: ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=blue"

edit: my solution was to set TERM=xterm-256color in .zshrc' file, before setting the fg color:

TERM=xterm-256color
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=8"
astroanax commented 3 years ago

Worked for me

nikbanerjee-ibm commented 3 years ago

Didn't work for me on iTerm with p10k and oh my zsh.

echotc Co is giving me 256.

My config has

TERM=xterm-256color
zle_highlight+=(paste:none)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=241,bold,underline"

It works when I open a new tab, but when I then run source ~/.zshrc in the same tab it loses the autosuggestion color and looks similar to the original screenshot.

MaxVanDeursen commented 3 years ago

Do you happen to have the FORCE_FLOAT option set? See my issue #565 , where I solved my problem with this by simply unsetting this option.

nikbanerjee-ibm commented 3 years ago

Unfortunately not, I just checked any and all zsh config I could find if FORCE_FLOAT is set anywhere and also checked setopt after sourcing ~/.zshrc and it's not set. Similarly, unsetopt FORCE_FLOAT does nothing in ways of resolving the issue for me.

perdona commented 3 years ago

I'm having the same issue with macOS and iTerm2

ariel-miculas commented 3 years ago
It works when I open a new tab, but when I then run source ~/.zshrc in the same tab it loses the autosuggestion color and looks similar to the original screenshot."

same issue for me on Ubuntu 18.04.5, zsh 5.4.2

MaxRink commented 3 years ago

same issue here with gnoe-terminal on manjaro, after resourcing the suggestions become solid

denpo1022 commented 2 years ago

Could this issue be a duplicate of #538 ? I just checked #538 and saw some solutions in the discussion there Btw, this problem seems already mentioned at the GitHub main page of powerlevel10k

Allanwby0516 commented 2 years ago

Hi, I have the same issue in macOS too.

image

MacOS: 12.4 zsh: 5.9

rea1shane commented 2 years ago

Hi, I have the same issue in macOS too. image MacOS: 12.4 zsh: 5.9

same issue when i update to macos 12.4

rea1shane commented 2 years ago

Hi, I have the same issue in macOS too. image MacOS: 12.4 zsh: 5.9

same issue when i update to macos 12.4

upgrade zsh-syntax-highlighting solved this problem

example:

cd $ZSH/custom/plugins/zsh-syntax-highlighting
git pull