diff options
author | 2015-03-12 14:57:34 +0200 | |
---|---|---|
committer | 2015-03-12 14:57:34 +0200 | |
commit | bc11d7b201fcb81f5457d5e3916512126649f6cf (patch) | |
tree | 69e0c164f5d00dc4396c0bb2e8016305800eb85f | |
parent | 97cfd82eedfc5173736c6780e8efcdc335054a8b (diff) | |
download | nnn-bc11d7b201fcb81f5457d5e3916512126649f6cf.tar.gz |
Confirm we are in a terminal
-rw-r--r-- | noice.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |