zsh:autosuggestions: Switch to history strategy

I don't feel as if I'm actively benefiting from match_prev_cmd and it
definitely makes my prompt slower. (One could probably make it faster by
pre-calculating the history events matching the (previously) executed
command in a preexec zsh-hook and then comparing each successor to the
currently typed command instead of repeating all the work every time
BUFFER changes)

With this change my fork is not needed anymore, so switch back to
zsh-users' repo and update it while at it.

This effectively reverts 77b2d63341 ("zsh:autosuggestions: Use own
fork for now").
This commit is contained in:
2025-06-24 00:06:33 +02:00
parent b7af03770e
commit 4b5dbd161a
3 changed files with 5 additions and 10 deletions

View File

@@ -1,13 +1,8 @@
# Set suggestions strategy # Set suggestions strategy
# match_prev_cmd: # history:
# Chooses the most recent match from history whose preceding item matches # Chooses the most recent match from history.
# the most recently executed command.
# Won't work as expected with HIST_IGNORE_ALL_DUPS or HIST_EXPIRE_DUPS_FIRST
# completion: # completion:
# Chooses a suggestion based on what tab-completion would suggest. # Chooses a suggestion based on what tab-completion would suggest.
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) ZSH_AUTOSUGGEST_STRATEGY=(history completion)
ZSH_AUTOSUGGEST_MATCH_NUM_PREV_CMDS=2
ZSH_AUTOSUGGEST_MATCH_PREV_MAX_CMDS=-1
# vim: ft=zsh # vim: ft=zsh

2
.gitmodules vendored
View File

@@ -126,7 +126,7 @@
url = https://github.com/sickill/stderred url = https://github.com/sickill/stderred
[submodule "zsh-autosuggestions"] [submodule "zsh-autosuggestions"]
path = .local/share/zsh/plugins/zsh-autosuggestions path = .local/share/zsh/plugins/zsh-autosuggestions
url = https://github.com/druckdev/zsh-autosuggestions url = https://github.com/zsh-users/zsh-autosuggestions
[submodule "zsh-syntax-highlighting"] [submodule "zsh-syntax-highlighting"]
path = .local/share/zsh/plugins/zsh-syntax-highlighting path = .local/share/zsh/plugins/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting url = https://github.com/zsh-users/zsh-syntax-highlighting