diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 17:05:10 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 17:38:03 +0530 |
commit | 0a5cf111b39710579dcdac609c9c1af6a1d19a69 (patch) | |
tree | f2559a1b1e4c7da72852169521ec10875cdda307 | |
parent | b5a7909bc8dacb13cbc4502c9586742292fc7152 (diff) |
npass/gen: only append newline if stdout isatty
-rw-r--r-- | src/npass/npass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/npass/npass.c b/src/npass/npass.c index 532ef47..23c3fa9 100644 --- a/src/npass/npass.c +++ b/src/npass/npass.c @@ -195,7 +195,7 @@ static int gen(int argc, char *argv[]) { r = pass_add(argv[optind], pass, len); if (!r) - printf("%s\n", pass); + printf("%s%s", pass, isatty(STDOUT_FILENO) ? "\n" : ""); out_free_pass: free(pass); |