From bfcb19b17256263c4fca826add7724ad7c847943 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 17 Apr 2014 07:52:42 +0200 Subject: [PATCH] zoomsh: only prints ZOOM> lead if a console is use (isatty) --- zoom/zoomsh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 2416cfd..e49487b 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -920,7 +920,10 @@ static int shell(struct zoom_sh *sh, int exit_on_error) #endif if (!line_in) /* no line buffer via readline or not enabled at all */ { - printf("ZOOM>"); fflush(stdout); + if (isatty(0)) + { + printf("ZOOM>"); fflush(stdout); + } if (!fgets(buf, sizeof(buf)-1, stdin)) { res = -1; -- 1.7.10.4