From bacc7eb8ae12b70650671f6ec3fd9e668c367cae Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 9 Aug 2022 11:04:30 +0300 Subject: [PATCH] bin/l: preserve the terminal content Switch to alternate screen. --- bin/l | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/l b/bin/l index 73a0458..193d6b4 100755 --- a/bin/l +++ b/bin/l @@ -1,14 +1,14 @@ #! /bin/sh case "$TERM" in - *rxvt*|screen*|*term*|vt100) - TERM=xterm - export TERM + *rxvt*|screen*|*term*|vt100) - xtitle "links@${HOSTNAME}" - exec links2 "$@" - ;; + xtitle "links@${HOSTNAME}" + tput smcup + TERM=xterm links2 "$@" + exec tput rmcup + ;; - *)echo "Wrong TERM" >&2 - ;; + *)echo "Wrong TERM" >&2 + ;; esac -- 2.39.5