From 39ca3dac45696a1d7ab3affe08a6498c661ccad9 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Fri, 17 Feb 2017 22:07:48 -0700 Subject: [PATCH] Use a different name for feature detection zpty So that it doesn't conflict when the file is sourced again --- src/features.zsh | 4 ++-- zsh-autosuggestions.zsh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features.zsh b/src/features.zsh index 35dfcc3..9c6a3ae 100644 --- a/src/features.zsh +++ b/src/features.zsh @@ -7,7 +7,7 @@ _zsh_autosuggest_feature_detect() { typeset -g _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD typeset -h REPLY - zpty $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME '{ zshexit() { kill -KILL $$; sleep 1 } }' + zpty zsh_autosuggest_feature_detect '{ zshexit() { kill -KILL $$; sleep 1 } }' if (( REPLY )); then _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=1 @@ -15,5 +15,5 @@ _zsh_autosuggest_feature_detect() { _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=0 fi - zpty -d $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME + zpty -d zsh_autosuggest_feature_detect } diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 3ece082..dc7d1a7 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -122,7 +122,7 @@ _zsh_autosuggest_feature_detect() { typeset -g _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD typeset -h REPLY - zpty $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME '{ zshexit() { kill -KILL $$; sleep 1 } }' + zpty zsh_autosuggest_feature_detect '{ zshexit() { kill -KILL $$; sleep 1 } }' if (( REPLY )); then _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=1 @@ -130,7 +130,7 @@ _zsh_autosuggest_feature_detect() { _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=0 fi - zpty -d $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME + zpty -d zsh_autosuggest_feature_detect } #--------------------------------------------------------------------#