mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Adapted Valodim's capture completion script to
implement a simple completion service
This commit is contained in:
parent
edc762de64
commit
c183ca22de
3 changed files with 147 additions and 1 deletions
|
|
@ -146,11 +146,13 @@ paused-autosuggest-self-insert() {
|
|||
}
|
||||
|
||||
autosuggest-first-completion() {
|
||||
local cursor=$CURSOR
|
||||
zle .complete-word || return 1
|
||||
CURSOR=$cursor
|
||||
}
|
||||
|
||||
show-suggestion() {
|
||||
[[ $LBUFFER == '' ]] && return
|
||||
[[ -n $ZLE_DISABLE_AUTOSUGGEST || $LBUFFER == '' ]] && return
|
||||
# TODO need a way to reset HISTNO so .history-beginning-search-backward
|
||||
# will always retrieve the last matching history entry
|
||||
# unset HISTNO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue