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

shell under Cygwin with ZSH_AUTOSUGGEST_STRATEGY=(completion) completly non responsive #497

Closed
avielsh opened this issue Jan 18, 2020 · 4 comments
Labels

Comments

@avielsh
Copy link

avielsh commented Jan 18, 2020

Describe the bug

Hi
I've noticed that using the completion feature of zsh-autosuggestions under Cygwin, makes the prompt completly unresponsive.
I'm aware of the slowness of cygwin's fork(), and using the history strategy, there's a small lag when typing , but after adding the completion option, the prompt will stop responding to any character typed.
Only solution I've found is to close the current shell and open a new one.

To Reproduce

Steps to reproduce the behavior:

% zsh -df
% source path/to/zsh-autosuggestions.zsh
% ZSH_AUTOSUGGEST_STRATEGY=(completion)

Expected behavior

Typing characters/commands on the prompt, should work normally (little lag is acceptable)

Desktop

  • OS + distribution: Windows 7 + Cygwin 3.1.2 (Tried both 32bit and 64bit)
  • Zsh version: 5.5.1
  • Plugin version: 0.63
@avielsh avielsh added the bug label Jan 18, 2020
@avielsh
Copy link
Author

avielsh commented Jan 18, 2020

Enabling ZSH_AUTOSUGGEST_USE_ASYNC=1 makes the prompt responsive again..Still a lag but at least it's working…
I'm wondering if this setting affects something/should zsh-autosuggestions should work out of the box w/o this setting ?

@ericfreese
Copy link
Member

Hey @avielsh, glad you were able to get things working.

I'm planning to switch the default from sync to async in an upcoming release. Thing is that async mode has a kind of annoying bug in zsh versions less than 5.0.8, so we may need to keep sync mode around for some users since we support back to 4.3.11. I may do some smart version detection stuff and either enable async or disable it, or maybe just make it a config option to opt out. Not sure yet, but anyway... should be coming soon by default for most users.

A related issue: #485

@avielsh
Copy link
Author

avielsh commented Jan 19, 2020

Thanks @ericfreese,
The async option really speeds up things up, also on my Mac setup.
I have initially missed it while skimming through the docs, but putting it on by default with version checking is important IMO, especially in situations like in Cygwin, which makes the shell completely unusable w/o it.

@ericfreese
Copy link
Member

I’ve created an issue to track making it enabled by default: #498

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

2 participants