From cf458d2a3bcc494a1ab63fdb542f528b42b71546 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Wed, 23 May 2018 14:50:56 -0600 Subject: [PATCH] Fix completion suggestions when compinit is not enabled Need to make sure compinit is called in the pty or the shell hangs --- src/strategies/completion.zsh | 2 ++ zsh-autosuggestions.zsh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/strategies/completion.zsh b/src/strategies/completion.zsh index 6517444..c8b176b 100644 --- a/src/strategies/completion.zsh +++ b/src/strategies/completion.zsh @@ -9,6 +9,8 @@ _zsh_autosuggest_capture_setup() { zmodload zsh/zutil # For `zparseopts` + autoload compinit && compinit + # There is a bug in zpty module (fixed in zsh/master) by which a # zpty that exits will kill all zpty processes that were forked # before it. Here we set up a zsh exit hook to SIGKILL the zpty diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 644bacf..756cfbc 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -506,6 +506,8 @@ zle -N autosuggest-toggle _zsh_autosuggest_widget_toggle _zsh_autosuggest_capture_setup() { zmodload zsh/zutil # For `zparseopts` + autoload compinit && compinit + # There is a bug in zpty module (fixed in zsh/master) by which a # zpty that exits will kill all zpty processes that were forked # before it. Here we set up a zsh exit hook to SIGKILL the zpty