diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-10-12 08:46:35 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-10-12 08:56:05 +0200 |
commit | f85403bfe61940f7dc55f2c1bc9ea8aeef60224f (patch) | |
tree | 402666c0ff4c749953279ef3e9cc399053c5fea9 /.config/bash/functions.sh | |
parent | ff06577f133f2f9235c7340ae7a6a650c8ce7a95 (diff) | |
download | dotfiles-f85403bfe61940f7dc55f2c1bc9ea8aeef60224f.tar.gz dotfiles-f85403bfe61940f7dc55f2c1bc9ea8aeef60224f.tar.bz2 dotfiles-f85403bfe61940f7dc55f2c1bc9ea8aeef60224f.zip |
bash: Let "r" resize explicitly using 0,1 or 2 args
Diffstat (limited to '.config/bash/functions.sh')
-rw-r--r-- | .config/bash/functions.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 & } |