From 2b05f5ed2d44799e1d71ce3f186bcb5b07abd277 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Wed, 17 Apr 2019 23:28:20 -0600 Subject: [PATCH] Add a comment explaining post-completion hook --- src/strategies/completion.zsh | 3 +++ zsh-autosuggestions.zsh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/strategies/completion.zsh b/src/strategies/completion.zsh index bf4ed9a..c2d52f0 100644 --- a/src/strategies/completion.zsh +++ b/src/strategies/completion.zsh @@ -14,6 +14,9 @@ _zsh_autosuggest_capture_postcompletion() { } _zsh_autosuggest_capture_completion_widget() { + # Add a post-completion hook to be called after all completions have been + # gathered. The hook can modify compstate to affect what is done with the + # gathered completions. local -a +h comppostfuncs comppostfuncs=(_zsh_autosuggest_capture_postcompletion) diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index f2fe337..449d68b 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -496,6 +496,9 @@ _zsh_autosuggest_capture_postcompletion() { } _zsh_autosuggest_capture_completion_widget() { + # Add a post-completion hook to be called after all completions have been + # gathered. The hook can modify compstate to affect what is done with the + # gathered completions. local -a +h comppostfuncs comppostfuncs=(_zsh_autosuggest_capture_postcompletion)