From cdf56a330514cdff64fd4e09a737e9c4b93869d5 Mon Sep 17 00:00:00 2001 From: Lorenzo Bolla Date: Mon, 18 Jul 2016 10:56:21 +0100 Subject: [PATCH] Include result of `make` --- zsh-autosuggestions.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index ff201b9..5ebd993 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -74,6 +74,9 @@ ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS=( vi-forward-blank-word-end ) +# Max size of buffer to trigger autosuggestion. Leave undefined for no upper bound. +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE= + #--------------------------------------------------------------------# # Handle Deprecated Variables/Widgets # #--------------------------------------------------------------------# @@ -243,7 +246,7 @@ _zsh_autosuggest_modify() { # Get a new suggestion if the buffer is not empty after modification local suggestion if [ $#BUFFER -gt 0 ]; then - if [ -z "$ZSH_BUFFER_MAX_SIZE" -o $#BUFFER -lt "$ZSH_BUFFER_MAX_SIZE" ]; then + if [ -z "$ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" -o $#BUFFER -lt "$ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" ]; then suggestion="$(_zsh_autosuggest_suggestion "$BUFFER")" fi fi