From 508e6344711bebc9193774bcb0a4ea3eeb2a8071 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Tue, 6 Jun 2017 20:14:59 +0100 Subject: Load paths from command line args --- src/imv.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/imv.c b/src/imv.c index 8a510ce..0e37e20 100644 --- a/src/imv.c +++ b/src/imv.c @@ -263,6 +263,11 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv) /* if no paths are given as args, expect them from stdin */ if(argc == 0) { imv->paths_from_stdin = true; + } else { + /* otherwise, add the paths */ + for(int i = 0; i < argc; ++i) { + imv_add_path(imv, argv[i]); + } } if(imv->paths_from_stdin) { -- cgit v1.2.3