zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

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

Open imaqsood opened this issue 4 years ago • 14 comments

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

  • OS + distribution: Ubuntu 20.04
  • Zsh version: 5.8
  • Plugin version: commit ae315ded4dba10685dbbafbfa2ff3c1aefeb490d (HEAD -> master, tag: v0.6.4)

Additional context

Thank you

imaqsood avatar Aug 16 '20 14:08 imaqsood

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

astroanax avatar Sep 11 '20 07:09 astroanax

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"

alefontani avatar Sep 16 '20 10:09 alefontani

Worked for me

astroanax avatar Sep 17 '20 09:09 astroanax

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.

nikbanerjee-ibm avatar Sep 21 '20 09:09 nikbanerjee-ibm

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.

MaxVanDeursen avatar Sep 29 '20 11:09 MaxVanDeursen

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.

nikbanerjee-ibm avatar Sep 29 '20 15:09 nikbanerjee-ibm

I'm having the same issue with macOS and iTerm2

perdona avatar Oct 30 '20 14:10 perdona

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

ariel-miculas avatar Nov 19 '20 16:11 ariel-miculas

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

MaxRink avatar May 18 '21 10:05 MaxRink

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

denpo1022 avatar Sep 02 '21 08:09 denpo1022

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

Allanwby0516 avatar May 21 '22 18:05 Allanwby0516

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 avatar May 24 '22 15:05 rea1shane

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

rea1shane avatar May 25 '22 06:05 rea1shane