adding resize

This commit is contained in:
tengel 2024-03-20 11:28:46 -05:00
parent 005a695848
commit 9067b8af31

12
shell/resize.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
#
# SPDX-License-Identifier: MIT
# shellcheck disable=SC2268
if ! command -v resize > /dev/null; then
if [ "x$SHELL" = "x/bin/bash" ]; then
alias resize='shopt -s checkwinsize;COLUMNS=$(tput cols);LINES=$(tput lines);export COLUMNS LINES;echo -e "COLUMNS=$COLUMNS;\nLINES=$LINES;\nexport COLUMNS LINES;"'
else
alias resize='COLUMNS=$(tput cols);LINES=$(tput lines);export COLUMNS LINES;echo "COLUMNS=$COLUMNS;\nLINES=$LINES;\nexport COLUMNS LINES;"'
fi
fi