zsh-autosuggestions
zsh-autosuggestions copied to clipboard
Manipulating file descriptors and triggering a parse error produces error
Describe the bug
My .zshrc has a zshaddhistory hook that can cause this error message:
_zsh_autosuggest_async_request:zle:9: No handler installed for fd 12
To Reproduce
Steps to reproduce the behavior:
% zsh -df
% add-zsh-hook zshaddhistory hook
% hook() {
function> { exec {FD}>/dev/null } 2>/dev/null
function> }
% )
zsh: parse error near `)'
% )
_zsh_autosuggest_async_request:zle:9: No handler installed for fd 12
Expected behavior
No error message
Additional Context
Error message can be suppressed by adding 2>/dev/null to
zle -F $_ZSH_AUTOSUGGEST_ASYNC_FD