zsh-autosuggestions: zsh-autosuggestions misbehaving
Describe the bug
The zsh-autosuggestions is misbehaving. Every-time I start writing a command starting with letter a , the shell suggestion adds some gap between the third and second letter.
For example:
- when if try to write
awk -vit outputs me this :
- When trying to start ark from CLI, the output is :

To Reproduce
Steps to reproduce the behavior:
- Was trying to execute
date -u +%V$(uname)|sha1sum|sed 's/\W//g'but unfortunately executed :
Notice the missing
'and additional\n\n
- After this the problem started
Expected behavior
I shouldn’t be getting the output shown. I am not able to do stuff this way
Desktop
- OS + distribution: Arch Linux (plasma 5.20.1)
- Zsh version: 5.8
- Kernel: Linux 5.4.72-1-lts
Additional context
I tried out the commands on Konsole and Guake, Both are misbehaving. But somehow TTYs are good
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 8
- Comments: 21 (1 by maintainers)
It was caused by my
PROMPT. I changed$fg[cyan]to%{$fg[cyan]%}and the issue stopped.Can confirm, on starship prompt fixed it with
Thanks for the post above!
Did you manage to fix this? I have the same problem in mac. In iTerm in JetBrains editor terminal its misbihaving
I have to sign in to comment, bro you are the true hero 👍
Just my 2 cents for iTerm users This happened to me with starship prompt and drove me nuts pretty quickly.
I used the following configuration and noticed the issue didn’t occur when I removed the emoji / used my own prompt
Coercing single character width with
%Gseemed to fix the issueIf you see the same symptoms due to character widths ( after making sure
LC_ALLandLANGare utf-8), be sure to switch on the following in iTerm profile settings@AckslD thanks mate. Looks like it was my right side prompt setup. Once I adjusted that, the issue resolved
@sheanhoxie I solved this with the help of @ericfreese, see #578. Not sure it also solves the original issue by @deprov447 but worth a try.