Krolyxon
Commit fb6e4bd

Branches

Refs →

nsxivfb6e4bd

Only print marked files when -o is given

Fallback to print all files, if no images are marked, was kind of
irritating.
Author
Bert Münnich
Date
2013-08-22 09:44 +0200
Parent
7d878bd
Commit
fb6e4bdd980f72082a264894c12ed7e0650a5bf9

+8 −8

4 files changed

  1. M Makefile +1 −1
  2. M README.md +1 −1
  3. M commands.c +2 −2
  4. M sxiv.1 +4 −4
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20130810
1+VERSION = git-20130822
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M README.md View
@@ -79,7 +79,7 @@ of small previews is displayed, making it easy to choose an image to open.
7979 -i Read file list from stdin
8080 -n NUM Start at picture NUM
8181 -N NAME Set X window resource name to NAME
82− -o Write list of marked/all files to stdout when quitting
82+ -o Write list of marked files to stdout when quitting
8383 -p Pixelize, i.e. turn off image anti-aliasing
8484 -q Be quiet, disable warnings
8585 -r Search given directories recursively for images
M commands.c View
@@ -61,9 +61,9 @@ bool it_quit(arg_t a)
6161 {
6262 unsigned int i;
6363
64− if (options->to_stdout) {
64+ if (options->to_stdout && markcnt > 0) {
6565 for (i = 0; i < filecnt; i++) {
66− if (!markcnt || files[i].marked)
66+ if (files[i].marked)
6767 printf("%s\n", files[i].name);
6868 }
6969 }
M sxiv.1 View
@@ -62,10 +62,10 @@ Print brief usage information to standard output and exit.
6262 Read names of files to open from standard input.
6363 .TP
6464 .B \-o
65−Write list of all marked files, or all opened files if no files are marked, to
66−standard output when quitting. If combined with
67−.IR \-i ,
68−then sxiv acts as a visual filter/pipe.
65+Write list of all marked files to standard output when quitting. In combination
66+with
67+.I \-i
68+sxiv can be used as a visual filter/pipe.
6969 .TP
7070 .B \-p
7171 Pixelize images, i.e. turn off anti-aliasing.