add TERM fixup
This commit is contained in:
parent
a6b87e2330
commit
04b31f7a24
@ -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
|
||||||
|
18
.config/zsh/rc/terminal.zsh
Normal file
18
.config/zsh/rc/terminal.zsh
Normal 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}"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user