aboutsummaryrefslogtreecommitdiff
path: root/ponysay.sh
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-18 17:57:50 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-18 17:57:50 +0200
commit1dc737fb8b51e224ed29e60ae3c1751e3d54f31f (patch)
tree27d0007c396ce09c1f07d7bc3ba95cb69c6d96ba /ponysay.sh
parent6e754c5509228f7c9b7d2aa3eca0ab6fb4e211d6 (diff)
downloadponysay-1dc737fb8b51e224ed29e60ae3c1751e3d54f31f.tar.gz
ponysay-1dc737fb8b51e224ed29e60ae3c1751e3d54f31f.tar.bz2
ponysay-1dc737fb8b51e224ed29e60ae3c1751e3d54f31f.zip
m misc
Diffstat (limited to 'ponysay.sh')
-rwxr-xr-xponysay.sh18
1 files changed, 3 insertions, 15 deletions
diff --git a/ponysay.sh b/ponysay.sh
index 10aa32a..27c0dce 100755
--- a/ponysay.sh
+++ b/ponysay.sh
@@ -53,25 +53,19 @@ ponyquotes() {
# Function for printing the ponies and the message
say() {
- # Ponies use UTF-8 drawing characters. Prevent a Perl warning.
- export PERL_UNICODE=S
-
- # Clear screen in TTY
- ( [ "$TERM" = "linux" ] || [ "$TERM" = "-linux-" ] ) && echo -ne '\e[H\e[2J'
-
# Set PONYSAY_SHELL_LINES to default if not specified
[ "$PONYSAY_SHELL_LINES" = "" ] && PONYSAY_SHELL_LINES=2
-
+
# Height trunction, show top
function htrunchead {
head --lines=$(( $scrh - $PONYSAY_SHELL_LINES ))
}
-
+
# Height trunction, show bottom
function htrunctail {
tail --lines=$(( $scrh - $PONYSAY_SHELL_LINES ))
}
-
+
# Simplification of customisation of cowsay
if [ $customcmd = 0 ]; then
function cowcmd {
@@ -128,12 +122,6 @@ fi
# Parse options
while getopts "f:W:Llhvq" OPT; do
case ${OPT} in
- v) version; exit ;;
- h) usage; exit ;;
- f) ponies+=( $OPTARG ) ;;
- l) list; exit ;;
- L) linklist; exit ;;
- W) wrap="$OPTARG" ;;
q) shift $((OPTIND - 1)); ponyquotes "$*"; exit ;;
\?) usage >&2; exit 1 ;;
esac