aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-08-20 13:31:20 -0400
committerDave Reisner <dreisner@archlinux.org>2014-08-20 13:31:20 -0400
commit0b37cc5e37bbe0898505edfd4faea9981888bd07 (patch)
tree12e42747119b7f76a8c54d8f17770c4f9d5d05b3
parent458bccec0783cfa2727d4a27d4d506383df792d3 (diff)
downloadmirror-ponymix-0b37cc5e37bbe0898505edfd4faea9981888bd07.tar.gz
mirror-ponymix-0b37cc5e37bbe0898505edfd4faea9981888bd07.tar.bz2
mirror-ponymix-0b37cc5e37bbe0898505edfd4faea9981888bd07.zip
more ponies behind fewer pipes.
-rw-r--r--ponymix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ponymix.cc b/ponymix.cc
index 48a751e..37dec3f 100644
--- a/ponymix.cc
+++ b/ponymix.cc
@@ -472,7 +472,8 @@ static const std::pair<const string, const Command>& string_to_command(
}
static void version() {
- execlp("ponysay", "ponysay", "-b", "", "ponymix " PONYMIX_VERSION, NULL);
+ if (isatty(fileno(stdout)))
+ execlp("ponysay", "ponysay", "-b", "", "ponymix " PONYMIX_VERSION, NULL);
// Some people are pony haters.
fputs("ponymix v" PONYMIX_VERSION "\n", stdout);