Last active
August 29, 2015 13:59
-
-
Save cmittendorf/10969665 to your computer and use it in GitHub Desktop.
Set the size of the current terminal to number of columns and rows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ $# != 0 -a $# != 2 ]; then | |
echo `basename $0`" <cols> <rows>" | |
exit | |
fi | |
COLS=${1:-80} | |
ROWS=${2:-25} | |
osascript << EOF | |
tell application "Terminal" | |
tell first window | |
tell first tab | |
set number of columns to ${COLS} | |
set number of rows to ${ROWS} | |
end tell | |
end tell | |
end tell | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment