Fix completion suggestions when compinit is not enabled

Need to make sure compinit is called in the pty or the shell hangs
This commit is contained in:
Eric Freese 2018-05-23 14:50:56 -06:00
parent 3dbd9afaec
commit cf458d2a3b
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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