mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
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:
parent
dcce973287
commit
39ca3dac45
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
|
|
Loading…
Reference in a new issue