mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-29 15:59:06 +01:00
Add possibility to replace the entire buffer from suggestion strategies
This commit is contained in:
parent
0e810e5afa
commit
f0a08e1647
4 changed files with 44 additions and 14 deletions
|
|
@ -19,7 +19,10 @@ _zsh_autosuggest_fetch_suggestion() {
|
|||
_zsh_autosuggest_strategy_$strategy "$1"
|
||||
|
||||
# Ensure the suggestion matches the prefix
|
||||
[[ "$suggestion" != "$1"* ]] && unset suggestion
|
||||
if [[ "$suggestion" != "$1"* ]]; then
|
||||
unset suggestion
|
||||
unset new_buffer
|
||||
fi
|
||||
|
||||
# Break once we've found a valid suggestion
|
||||
[[ -n "$suggestion" ]] && break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue