Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manipulating file descriptors and triggering a parse error produces error #800

Open
Iori-Pimentel opened this issue Aug 20, 2024 · 1 comment
Labels

Comments

@Iori-Pimentel
Copy link

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
@Iori-Pimentel Iori-Pimentel changed the title Creating a zshaddhistory hook and triggering a parse error produces error Manipulating file descriptors and triggering a parse error produces error Aug 20, 2024
@Iori-Pimentel
Copy link
Author

Found out that hook is unneccesary to reproduce bug. This seems enough:

% { exec {FD}</dev/null } 2>/dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant