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

ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE ignored unless it is zero #356

Closed
Zeturic opened this issue Jul 8, 2018 · 1 comment
Closed

ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE ignored unless it is zero #356

Zeturic opened this issue Jul 8, 2018 · 1 comment

Comments

@Zeturic
Copy link

Zeturic commented Jul 8, 2018

Basically, zsh-autosuggestions will continue to offer suggestions of any length, even lengths greater than those specified by ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE. It is set to 20, but it still suggests lines from my history that are longer than 20.

I initially thought ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE was being ignored entirely after trying several numbers and seeing no change, but then I set it as zero and that (correctly) disabled autosuggestions entirely.

Edit: Sorry, forgot to mention. This is zsh 5.5.1 under Cygwin, and I'm using the latest commit of zsh-autosuggestions.

@ericfreese
Copy link
Member

ericfreese commented Jul 8, 2018

It sounds like you've misunderstood what ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE does.

From the readme:

Set ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE to an integer value to disable autosuggestion for large buffers. The default is unset, which means that autosuggestion will be tried for any buffer size. Recommended value is 20. This can be useful when pasting large amount of text in the terminal, to avoid triggering autosuggestion for too long strings.

The word "buffer" in this case refers to the text you've typed so far into the command line.

So if you've set it to 10, it will stop giving you suggestions after you've typed 11 characters. It has no effect on which suggestions are given.

#322 was a similar misunderstanding.

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

No branches or pull requests

2 participants