From: lostd Date: Thu, 12 Mar 2015 12:57:34 +0000 (+0200) Subject: Confirm we are in a terminal X-Git-Tag: v1.0~92^2~70 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=bc11d7b201fcb81f5457d5e3916512126649f6cf;p=nnn.git Confirm we are in a terminal --- diff --git a/noice.c b/noice.c index e56a5f9a..600e5702 100644 --- a/noice.c +++ b/noice.c @@ -835,6 +835,10 @@ main(int argc, char *argv[]) char cwd[PATH_MAX], *ipath; char *ifilter; + /* Confirm we are in a terminal */ + if (!isatty(STDIN_FILENO)) + printerr(1, "isatty"); + if (getuid() == 0) ifilter = "."; else