projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
zoomsh: only prints ZOOM> lead if a console is use (isatty)
[yaz-moved-to-github.git]
/
zoom
/
zoomsh.c
diff --git
a/zoom/zoomsh.c
b/zoom/zoomsh.c
index
2416cfd
..
e49487b
100644
(file)
--- 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;