adding resize
This commit is contained in:
parent
005a695848
commit
9067b8af31
1 changed files with 12 additions and 0 deletions
12
shell/resize.sh
Executable file
12
shell/resize.sh
Executable 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue