Zsh-autosuggestions: Ubuntu 20.4 terminal the suggestion text color is the same as terminal tex

Created on 16 Aug 2020  路  8Comments  路  Source: zsh-users/zsh-autosuggestions

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

bug

Most helpful comment

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"

All 8 comments

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

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"

Worked for me

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.

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.

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.

I'm having the same issue with macOS and iTerm2

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moritzschaefer picture moritzschaefer  路  5Comments

hiteshsharma picture hiteshsharma  路  5Comments

clay-f picture clay-f  路  7Comments

raulferras picture raulferras  路  3Comments

dipam7 picture dipam7  路  3Comments