1
0

add TERM fixup

This commit is contained in:
Konstantin Demin 2021-04-07 15:40:59 +03:00
parent a6b87e2330
commit 04b31f7a24
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6
2 changed files with 19 additions and 0 deletions

View File

@ -52,6 +52,7 @@
!/.config/zsh/rc/keyboard.zsh !/.config/zsh/rc/keyboard.zsh
!/.config/zsh/rc/pager.zsh !/.config/zsh/rc/pager.zsh
!/.config/zsh/rc/prompt.zsh !/.config/zsh/rc/prompt.zsh
!/.config/zsh/rc/terminal.zsh
!/.config/zsh/var/.keep !/.config/zsh/var/.keep
!/.gdbinit !/.gdbinit
!/.gitconfig !/.gitconfig

View File

@ -0,0 +1,18 @@
#!/bin/zsh
function {
[ "${ZSHU_RUN[nested]}" = 1 ] || return
local -a a
local x
for i ( ${ZSHU_PARENTS_PID} ) ; do
[ -r /proc/$i/environ ] || continue
x=$(tr '\0' '\n' < /proc/$i/environ | sed -En '/^TERM=(.+)$/{s//\1/;p;}')
[ -n "$x" ] || continue
a+=( "$x" )
done
export ORIG_TERM="${a[-1]}"
echo "${TERM}" | grep -Fq "${ORIG_TERM}" && return
export TERM="${TERM}.${ORIG_TERM}"
}