zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

After upgrading zsh 5.5.1 → 5.8.1 : zpty:23: can't open pseudo terminal: bad file descriptor

Open avielsh opened this issue 5 years ago • 2 comments

Describe the bug

Under cygwin x86_64/x86 After upgrading zsh from 5.5.1 to 5.8.1 , and enabling ZSH_AUTOSUGGEST_STRATEGY=(completion), I'm getting the following error after typing commands that trigger suggestions ( IE :ls<space> )

zpty:23: can't open pseudo terminal: bad file descriptor
_zsh_autosuggest_strategy_completion:zpty:24: no such pty command: zsh_autosuggest_completion_pty

Happens with either export ZSH_AUTOSUGGEST_USE_ASYNC=1 or unset ZSH_AUTOSUGGEST_USE_ASYNC

Reverting back to zsh v5.5.1 fixes the issue.

To Reproduce

% zsh -df
% autoload -Uz compinit && compinit
% source .oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
% export ZSH_AUTOSUGGEST_STRATEGY=(completion)
% ls<space>

Expected behavior

The standard completion suggestions

Desktop

  • OS + Windows 7 x64 sp1 , cygwin x86_64 3.1.7-1
  • Zsh version: 5.8.1-1
  • Plugin version: 0.6.4

avielsh avatar Sep 02 '20 22:09 avielsh

Just encountered this issue, bumping this with some more information.

On further trial, it appears that zpty doesn't seem to work at all on cygwin? I'm not very familliar with zpty or zsh, but I would thing this would work:

zmodload zsh/zpty
zpty mytest 'echo hi'

But it doesn't?

zpty: can't open pseudo terminal: bad file descriptor

I also found this thread about zpty not working on zsh with cygwin, so maybe this is just a long running issue?

I don't really know were to begin, but any workarounds would be amazing.

Timothy-Gonzalez avatar Feb 08 '23 08:02 Timothy-Gonzalez