1
0

split term functions

This commit is contained in:
Konstantin Demin 2021-06-05 13:49:09 +03:00
parent 5addb3ae5e
commit 6530af46f0
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6
2 changed files with 18 additions and 16 deletions

18
.config/zsh/lib/term.zsh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/zsh
typeset -Uga ZSHU_TERM_MISSING
z-ti-test() {
local r i
r=0
for i ; do
[ -z "$i" ] && continue
if ! (( ${+terminfo[$i]} )) ; then
ZSHU_TERM_MISSING+=( "$1" )
r=1
fi
done
return $r
}

View File

@ -1,24 +1,8 @@
#!/bin/zsh
typeset -Uga ZSHU_TERM_MISSING
typeset -A ZSHU_TI_KEYS
typeset -A ZSHU_FB_KEYS
z-ti-test() {
local r i
r=0
for i ; do
[ -z "$i" ] && continue
if ! (( ${+terminfo[$i]} )) ; then
ZSHU_TERM_MISSING+=( "$1" )
r=1
fi
done
return $r
}
if z-ti-test smkx rmkx ; then
zle-line-init() { emulate -L zsh ; echoti smkx ; }
zle-line-finish() { emulate -L zsh ; echoti rmkx ; }