mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-21 11:54:21 +01:00
Merge pull request #15 from L-four/master
Print usage and exit when no stdin and no arguments are present
This commit is contained in:
commit
a018192fa0
1 changed files with 6 additions and 0 deletions
6
ponysay
6
ponysay
|
@ -45,6 +45,12 @@ Options:
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if no stdin and no argumrnts then print usage and exit
|
||||||
|
if [[ -t 0 && $# == 0 ]]; then
|
||||||
|
usage
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
say() {
|
say() {
|
||||||
# Ponies use UTF-8 drawing characters. Prevent a Perl warning.
|
# Ponies use UTF-8 drawing characters. Prevent a Perl warning.
|
||||||
export PERL_UNICODE=S
|
export PERL_UNICODE=S
|
||||||
|
|
Loading…
Reference in a new issue