summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ct13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/ct b/bin/ct
index 6454fad..12b80d5 100755
--- a/bin/ct
+++ b/bin/ct
@@ -18,9 +18,11 @@ setopt extended_glob
typeset -a -U triggers
typeset -a PKG_ROOTS CL_OPTIONS
-c_info=$'\e[0;36m'
-c_error=$'\e[0;31m'
-c_reset=$'\e[0m'
+if [[ -t 1 ]] {
+ c_info=$'\e[0;36m'
+ c_error=$'\e[0;31m'
+ c_reset=$'\e[0m'
+}
## Basic output functions
@@ -118,6 +120,11 @@ if (( SILENT )) {
self=${0}
self_path=${PKG_DIR}/${${(s:/:)$(readlink ${self})}[-3]}
+if [[ ! -t 1 ]] {
+ PROGRESS=0
+ function clear_line {}
+}
+
if (( SILENT )) {
# The goal is not to override anything set by the user...
# So, an alias should be safer than fiddling with ${MAKEFLAGS}