Zsh-autosuggestions: Incomplete suggestions - shows only first character

Created on 17 May 2017  路  9Comments  路  Source: zsh-users/zsh-autosuggestions

zsh-suggestions shows just the first character of the suggestion and not the entire string. For example if a have a subfolder document and I type cd d it shows just the o and not ocument.

I tried to change theme but nothing changes.

I am on OS X using ITerm2.

bug

Most helpful comment

@engintekin , thanks for the reference.
To save you from the long reading. The following command can solve the problem:
echo ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=\'fg=60\' >> $ZSH_CUSTOM/zsh-autosuggestions_custom.zsh

All 9 comments

Well this is weird. Can you reproduce with only zsh-autosuggestions sourced?

% zsh -f
% source zsh-autosuggestions.zsh

Yes it as the same behavior, if not worse actually. If I type c it proposes d (for cd) for example. But then, if I have the folder Documents and I type D it does not propose anything!

You are aware it only suggests things from your history right? So it won't suggest cd Documents unless you've previously executed that command.

Yes of course. But still it shows just the next character in the suggestion and not the whole string.

@ericfreese ok found the issue. Apparently the plugin was using a color identical to the background for the suggestion. My theme's fault!

Same happens with Solarized Dark theme on iTerm but i would still like to keep using the theme. Any way to change suggestions hint color?

@dakaugu Solarized Dark theme is fixing this issue https://gist.github.com/kevin-smets/8568070#iterm2

@engintekin , thanks for the reference.
To save you from the long reading. The following command can solve the problem:
echo ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=\'fg=60\' >> $ZSH_CUSTOM/zsh-autosuggestions_custom.zsh

Thanks I was having this same issue on my side love that it works now :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sebw picture sebw  路  6Comments

hiteshsharma picture hiteshsharma  路  5Comments

NikKovIos picture NikKovIos  路  4Comments

clay-f picture clay-f  路  7Comments

metalmac picture metalmac  路  4Comments