zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
31.54k stars 1.87k forks source link

syntax error near unexpected token `(' #636

Open A2DNEW opened 3 years ago

A2DNEW commented 3 years ago

After run this line I get error: source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

Error:

-bash:  ! ${+ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_STRATEGY} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_CLEAR_WIDGETS} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_ACCEPT_WIDGETS} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_EXECUTE_WIDGETS} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_IGNORE_WIDGETS} : bad substitution
-bash:  ! ${+ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME} : bad substitution
-bash: /Users/mohammad/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh: line 95: syntax error near unexpected token `('
-bash: /Users/mohammad/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh: line 95: `     user:_zsh_autosuggest_(bound|orig)_*)'
maxicarlos08 commented 2 years ago

This extension is for ZSH shells and it seems that you are trying to use it with Bash, which will obviously not work.

Using zsh will fix this.