diff options
author | Axel Wagner <mail@merovius.de> | 2013-05-16 22:49:13 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-05-19 19:51:01 +0200 |
commit | 7a372b0f4627b9482d1276238348a1432c13fbe3 (patch) | |
tree | 0512bedece7ba0157c89f917c138934920ac1373 /src/auto_detect_format.c | |
parent | 8445d6a929303ca8d63f8d04fd7594a05a2734d6 (diff) |
Implement term-output-format
Diffstat (limited to 'src/auto_detect_format.c')
-rw-r--r-- | src/auto_detect_format.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/auto_detect_format.c b/src/auto_detect_format.c index 6ec5f73..524e2e9 100644 --- a/src/auto_detect_format.c +++ b/src/auto_detect_format.c @@ -30,6 +30,11 @@ * */ char *auto_detect_format(void) { + /* If stdout is a tty, we output directly to a terminal. */ + if (isatty(STDOUT_FILENO)) { + return "term"; + } + pid_t myppid = getppid(); pid_t mypid = getpid(); |