comparison .zfun/zsh-autosuggestions/src/features.zsh @ 467:e1ce8897030d

zsh: import df6f6f9ff41 of zsh-autosuggestions
author Augie Fackler <raf@durin42.com>
date Mon, 03 Dec 2018 22:37:29 -0500
parents
children
comparison
equal deleted inserted replaced
466:f248cf012d9a 467:e1ce8897030d
1
2 #--------------------------------------------------------------------#
3 # Feature Detection #
4 #--------------------------------------------------------------------#
5
6 _zsh_autosuggest_feature_detect_zpty_returns_fd() {
7 typeset -g _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD
8 typeset -h REPLY
9
10 zpty zsh_autosuggest_feature_detect '{ zshexit() { kill -KILL $$; sleep 1 } }'
11
12 if (( REPLY )); then
13 _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=1
14 else
15 _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=0
16 fi
17
18 zpty -d zsh_autosuggest_feature_detect
19 }