Use a different name for feature detection zpty

So that it doesn't conflict when the file is sourced again
This commit is contained in:
Eric Freese 2017-02-17 22:07:48 -07:00
parent dcce973287
commit 39ca3dac45
2 changed files with 4 additions and 4 deletions

View file

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

View file

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