From e9e87f6895c7ba7fe7966cd9fba8c06e3168e0c4 Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Wed, 7 May 2014 09:57:21 -0500 Subject: [PATCH] Only print fortunes in terminals --- runcoms/zlogin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runcoms/zlogin b/runcoms/zlogin index 32f28cfb..3aa97905 100644 --- a/runcoms/zlogin +++ b/runcoms/zlogin @@ -16,7 +16,9 @@ # Print a random, hopefully interesting, adage. if (( $+commands[fortune] )); then - fortune -a - print + if [[ -t 0 || -t 1 ]]; then + fortune -a + print + fi fi