summaryrefslogtreecommitdiffstats
path: root/.zfunc/set-title
diff options
context:
space:
mode:
authorMarc Pervaz Boocha <mboocha@sudomsg.xyz>2024-09-30 23:15:22 +0530
committerMarc Pervaz Boocha <mboocha@sudomsg.xyz>2024-09-30 23:15:22 +0530
commitff49c88bec023355af49e4ec7bc1037fde463693 (patch)
treeff5f217785c2764c434359587cabf3a726d3beac /.zfunc/set-title
parentUpdated nvim config (diff)
downloaddotfiles-ff49c88bec023355af49e4ec7bc1037fde463693.tar
dotfiles-ff49c88bec023355af49e4ec7bc1037fde463693.tar.gz
dotfiles-ff49c88bec023355af49e4ec7bc1037fde463693.tar.bz2
dotfiles-ff49c88bec023355af49e4ec7bc1037fde463693.tar.lz
dotfiles-ff49c88bec023355af49e4ec7bc1037fde463693.tar.xz
dotfiles-ff49c88bec023355af49e4ec7bc1037fde463693.tar.zst
dotfiles-ff49c88bec023355af49e4ec7bc1037fde463693.zip
Update nvim config
Diffstat (limited to '.zfunc/set-title')
-rw-r--r--.zfunc/set-title10
1 files changed, 6 insertions, 4 deletions
diff --git a/.zfunc/set-title b/.zfunc/set-title
index ae46b5a..cba1aeb 100644
--- a/.zfunc/set-title
+++ b/.zfunc/set-title
@@ -1,10 +1,12 @@
#!zsh
emulate -L zsh
-if tput hs
+zmodload zsh/terminfo
+
+if [[ $teminfo[hs] == "yes" ]]
then
- tsl="$(tput tsl)"
- fsl="$(tput fsl)"
+ tsl="$terminfo[tsl]"
+ fsl="$terminfo[fsl]"
hs=1
else
case ${TERM} in
@@ -21,7 +23,7 @@ else
esac
fi
-if test "$hs" = 1
+if [[ "$hs" == 1 ]]
then
printf "%s" "$tsl"
printf "%s" "$@"