-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 Not Working Correctly? #322
Comments
What are you using to test that the autosuggestion functionality is broken? Can you give an example? |
It appears to be working better on my personal laptop actually, when |
I think you may be misunderstanding how BUFFER_MAX_SIZE works. When it is set to X, no suggestions will be shown if the length of the buffer is greater than X. So when you set it to 1, no suggestions are ever shown.
Do autosuggestions show when you set it to 5, but type less than 3 characters? Again, a more concrete example would be very helpful here. |
Does buffer refer to just the clipboard buffer, or the buffer of the total input entered on the shell prompt? |
It refers to the text entered into the shell prompt (http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#index-BUFFER) If you want to disable suggestions after pasting, you could add this line to your config:
|
Oh ok, then my understanding was incorrect. I thought I had read somewhere that setting a small-ish value for I don't necessarily care about enabling/disabling suggestions after pasting, I just want to speed up the paste action itself. What is the latest and greatest method / settings tune for that these days? |
Disable bracketed-paste-magic (BPM) if you don't need it. Otherwise, you can use zsh 5.4 or greater for faster pastes with BPM. Can also try the solution here, disabling autosuggestions while BPM is running. There's an example of that in the specs here: https://github.com/zsh-users/zsh-autosuggestions/blob/master/spec/integrations/bracketed_paste_magic_spec.rb |
I am using zsh 5.5.1 but didn't really notice any speed improvements with pasting. I commented out the lines below in autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic I initially tried the first linked solution by adding those functions to my Thanks for the help |
Just as an aside - are there any negative consequences from disabling BPM? |
You won't get the behavior it provides but other than that, no. I've personally not found it useful. |
If I set
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE
to a value < 6, for some reason it breaks the autosuggestion functionality. Anything >= 6 seems to work fine. I basically want to be able to disable autosuggestions for all pasting since whenever I paste a command it is always the full commandThe text was updated successfully, but these errors were encountered: