summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-08-24 19:20:54 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-08-24 19:20:54 +0200
commitaea70b203d19d02079a1d6c0b07d06220bf811d2 (patch)
tree0178fc11fc15dc9ddaf2eca91b265ce62e2ed956 /src/options.c
parent9fcf25807ad1e9c0b32985e0a77a6de8098fe91f (diff)
--filelist: Support reading from /dev/stdin ("-" as shortcut)
Note that read_filelist used to check if its argument was an image (for people accidentaly typing "feh -df *" instead of "feh -dF *"); this was removed because it failed on /dev/stdin. I might re-add it, but I'm not yet sure about the future of feh's automatic filelist saving.
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 13aaa95..c5ed85d 100644
--- a/src/options.c
+++ b/src/options.c
@@ -627,7 +627,10 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
opt.alpha_level = 255 - atoi(optarg);
break;
case 'f':
- opt.filelistfile = estrdup(optarg);
+ if (!strcmp(optarg, "-"))
+ opt.filelistfile = estrdup("/dev/stdin");
+ else
+ opt.filelistfile = estrdup(optarg);
break;
case '0':
opt.reload_button = atoi(optarg);