zsh-users / zsh-autosuggestions

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

compgen -g command cause repeatable autosuggestions crash #786

Open ETOgaosion opened 2 months ago

ETOgaosion commented 2 months ago

Describe the bug

compgen -g command cause repeatable autosuggestions crash, tested on multiple machines.

To Reproduce

Steps to reproduce the behavior:

  1. configure oh-my-zsh
  2. add zsh-autosuggestions to plugin(in .zshrc)
  3. type command compgen -g
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
cd .oh-my-zsh/custom/plugin/ && git clone https://github.com/zsh-users/zsh-autosuggestions.git && cd ~
vim ~/.zshrc
# add add zsh-autosuggestions to plugin=()
compgen -g

Expected behavior

no extra display

Screenshots

➜  ~ compgen -g      
_tags:comptags:36: can only be called from completion function
_tags:comptry:55: can only be called from completion function
_tags:comptags:60: can only be called from completion function

➜  ~ 
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
➜  ~ 
➜  ~ 
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
➜  ~ 
➜  ~ e
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
➜  ~ exit
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
➜  ~ exit
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
➜  ~ exit
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
➜  ~ exit
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'

Desktop

Additional context