From f85403bfe61940f7dc55f2c1bc9ea8aeef60224f Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 12 Oct 2011 08:46:35 +0200 Subject: bash: Let "r" resize explicitly using 0,1 or 2 args --- .config/bash/functions.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.config/bash/functions.sh') diff --git a/.config/bash/functions.sh b/.config/bash/functions.sh index dc49e58..06547ed 100644 --- a/.config/bash/functions.sh +++ b/.config/bash/functions.sh @@ -24,6 +24,16 @@ resize_to_min() { printf "\e[8;%d;%dt" $(max $LINES $2) $(max $COLUMNS $1) } +function r() { + if [ $# -ge 2 ]; then + resize $1 $2 + elif [ $# -ge 1 ]; then + resize $1 $LINES + else + resize_to_min 100 35 + fi +} + nh() { nohup "$@" &> /dev/null & } -- cgit