aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2017-06-06 20:14:59 +0100
committerHarry Jeffery <harry@exec64.co.uk>2017-06-06 20:14:59 +0100
commit508e6344711bebc9193774bcb0a4ea3eeb2a8071 (patch)
tree3b56940a78beb4831c9142963dbcdb954ff458cd /src
parent973fe152b5e98ca4e75af41284b00193157043c4 (diff)
downloadimv-508e6344711bebc9193774bcb0a4ea3eeb2a8071.tar.gz
Load paths from command line args
Diffstat (limited to 'src')
-rw-r--r--src/imv.c5
1 files changed, 5 insertions, 0 deletions
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) {