From: Oleg Broytman Date: Tue, 9 Aug 2022 08:04:30 +0000 (+0300) Subject: bin/l: preserve the terminal content X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=bacc7eb8ae12b70650671f6ec3fd9e668c367cae;p=dotfiles.git bin/l: preserve the terminal content Switch to alternate screen. --- 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