mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
zpty module is only needed for completion strategy
This commit is contained in:
parent
dad6be4d5e
commit
5529102afc
6 changed files with 7 additions and 22 deletions
|
|
@ -25,16 +25,6 @@
|
|||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Setup #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
# Precmd hooks for initializing the library and starting pty's
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Asynchronous suggestions are generated in a pty
|
||||
zmodload zsh/zpty
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Global Configuration Variables #
|
||||
#--------------------------------------------------------------------#
|
||||
|
|
@ -567,6 +557,8 @@ _zsh_autosuggest_capture_buffer() {
|
|||
}
|
||||
|
||||
_zsh_autosuggest_capture_completion() {
|
||||
zmodload -s zsh/zpty || return
|
||||
|
||||
typeset -g completion
|
||||
local line REPLY
|
||||
|
||||
|
|
@ -780,4 +772,5 @@ _zsh_autosuggest_start() {
|
|||
}
|
||||
|
||||
# Start the autosuggestion widgets on the next precmd
|
||||
autoload -Uz add-zsh-hook
|
||||
add-zsh-hook precmd _zsh_autosuggest_start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue