aboutsummaryrefslogtreecommitdiff
path: root/notmuch-new.c
diff options
context:
space:
mode:
authorƁukasz Stelmach <l.stelmach@samsung.com>2017-03-02 13:22:01 +0100
committerDavid Bremner <david@tethera.net>2017-03-09 10:17:12 -0400
commit3071fc04fbf3c43f18291cb8e61b566cdf85d762 (patch)
treec81a18abd9a792871cecd91f034aa3cc9ad165c5 /notmuch-new.c
parent0497d695ca796c4d19ad5ec08788bbb1f400c58c (diff)
cli/new: Avoid printing "\033[K" to non-terminal output
Diffstat (limited to 'notmuch-new.c')
-rw-r--r--notmuch-new.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/notmuch-new.c b/notmuch-new.c
index 13212639..e2822e23 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -905,10 +905,9 @@ print_results (const add_files_state_t *state)
state->processed_files == 1 ? "file" : "total files");
notmuch_time_print_formatted_seconds (elapsed);
if (elapsed > 1)
- printf (" (%d files/sec.).\033[K\n",
+ printf (" (%d files/sec.)",
(int) (state->processed_files / elapsed));
- else
- printf (".\033[K\n");
+ printf (".%s\n", (state->output_is_a_tty) ? "\033[K" : "");
}
if (state->added_messages)