From 63972db743398a4c2f0159110f5e14fb1effb6d5 Mon Sep 17 00:00:00 2001 From: N-R-K <79544946+N-R-K@users.noreply.github.com> Date: Tue, 21 Sep 2021 05:11:47 +0600 Subject: add -0 for outputting null-terminated list (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add -0 for outputting null-terminated list this doesn't add much, if any, additional complexity to the codebase and can be quite handy for scripting purposes. Closes: https://github.com/nsxiv/nsxiv/issues/67 * Fix typo Co-authored-by: Berke Kocaoğlu --- commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands.c') diff --git a/commands.c b/commands.c index aad2c3c..15859fa 100644 --- a/commands.c +++ b/commands.c @@ -59,7 +59,7 @@ bool cg_quit(arg_t _) if (options->to_stdout && markcnt > 0) { for (i = 0; i < filecnt; i++) { if (files[i].flags & FF_MARK) - printf("%s\n", files[i].name); + printf("%s%c", files[i].name, options->stdout_separator); } } exit(EXIT_SUCCESS); -- cgit v1.2.3-54-g00ecf