浏览代码

Only print marked files when -o is given

Fallback to print all files, if no images are marked, was kind of
irritating.
master
Bert Münnich 12 年前
父节点
当前提交
fb6e4bdd98
共有 4 个文件被更改,包括 8 次插入8 次删除
  1. +1
    -1
      Makefile
  2. +1
    -1
      README.md
  3. +2
    -2
      commands.c
  4. +4
    -4
      sxiv.1

+ 1
- 1
Makefile 查看文件

@@ -1,4 +1,4 @@
VERSION = git-20130810 VERSION = git-20130822


PREFIX = /usr/local PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man MANPREFIX = $(PREFIX)/share/man


+ 1
- 1
README.md 查看文件

@@ -79,7 +79,7 @@ of small previews is displayed, making it easy to choose an image to open.
-i Read file list from stdin -i Read file list from stdin
-n NUM Start at picture NUM -n NUM Start at picture NUM
-N NAME Set X window resource name to NAME -N NAME Set X window resource name to NAME
-o Write list of marked/all files to stdout when quitting -o Write list of marked files to stdout when quitting
-p Pixelize, i.e. turn off image anti-aliasing -p Pixelize, i.e. turn off image anti-aliasing
-q Be quiet, disable warnings -q Be quiet, disable warnings
-r Search given directories recursively for images -r Search given directories recursively for images


+ 2
- 2
commands.c 查看文件

@@ -61,9 +61,9 @@ bool it_quit(arg_t a)
{ {
unsigned int i; unsigned int i;


if (options->to_stdout) { if (options->to_stdout && markcnt > 0) {
for (i = 0; i < filecnt; i++) { for (i = 0; i < filecnt; i++) {
if (!markcnt || files[i].marked) if (files[i].marked)
printf("%s\n", files[i].name); printf("%s\n", files[i].name);
} }
} }


+ 4
- 4
sxiv.1 查看文件

@@ -62,10 +62,10 @@ Print brief usage information to standard output and exit.
Read names of files to open from standard input. Read names of files to open from standard input.
.TP .TP
.B \-o .B \-o
Write list of all marked files, or all opened files if no files are marked, to Write list of all marked files to standard output when quitting. In combination
standard output when quitting. If combined with with
.IR \-i , .I \-i
then sxiv acts as a visual filter/pipe. sxiv can be used as a visual filter/pipe.
.TP .TP
.B \-p .B \-p
Pixelize images, i.e. turn off anti-aliasing. Pixelize images, i.e. turn off anti-aliasing.


||||||
x
 
000:0
正在加载...
取消
保存