From 42f2b034b55f80a49852172cce1c489016e7a00d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 8 Dec 2025 16:30:11 +0100 Subject: [PATCH] zsh: Change autosuggest strategy and max size New combined strategy will first gather suggestions from the history, and if none are found fall back on normal completion options (e.g. `ls ` may suggest files in current dir, etc). Also changed the max size that completions will use as buffer to 20, so we don't have auto suggestions for _huge_ scripts anymore. --- terminal/.config/zsh/zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terminal/.config/zsh/zshrc b/terminal/.config/zsh/zshrc index d2ccd18..cd73e71 100644 --- a/terminal/.config/zsh/zshrc +++ b/terminal/.config/zsh/zshrc @@ -46,6 +46,9 @@ else # or manually fi unset PLUG_FOLDER +ZSH_AUTOSUGGEST_STRATEGY=(history completion) +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 + # simple fzf-tab settings zstyle ":fzf-tab:*" fzf-flags "--ansi" "--expect='$continuous_trigger,$print_query'" "--color=hl:$(($#headers == 0 ? 108 : 255))" "--nth=2,3" "--layout=reverse" "--height=${FZF_TMUX_HEIGHT:-75%}" "--tiebreak=begin" "-m" "--bind=tab:down,btab:up,change:top,ctrl-space:toggle" "--cycle" "--query=$query" "--header-lines=$#headers" "--print-query"