From bc4b12953666ef2599fb2a913a0a470d3c2ccd8b Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 18 Nov 2017 17:02:43 +0100 Subject: [PATCH] lazy.sh: support non-terminal outputs --- lazy.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lazy.sh b/lazy.sh index 7556321..fd28f68 100755 --- a/lazy.sh +++ b/lazy.sh @@ -1,8 +1,13 @@ #!/bin/sh set -e -bold=$(tput bold) -normal=$(tput sgr0) +if [ ! -z "$TERM" ]; then + bold=$(tput bold) + normal=$(tput sgr0) +else + bold="" + normal="" +fi step() { echo "${bold}$1${normal}"