diff options
-rw-r--r-- | doc/imv.1.txt | 3 | ||||
-rw-r--r-- | src/imv.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/imv.1.txt b/doc/imv.1.txt index 6c2b45c..4a3fdaf 100644 --- a/doc/imv.1.txt +++ b/doc/imv.1.txt @@ -28,6 +28,9 @@ Options *-h*:: Show help message and quit. +*-v*:: + Show version and quit. + *-b* <background>:: Set the background colour. Can either be a 6-digit hexadecimal colour code or 'checks' to show a chequered background. @@ -644,7 +644,7 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv) int o; - while((o = getopt(argc, argv, "frdwWxhlu:s:n:b:t:")) != -1) { + while((o = getopt(argc, argv, "frdwWxhvlu:s:n:b:t:")) != -1) { switch(o) { case 'f': imv->fullscreen = true; break; case 'r': imv->recursive_load = true; break; @@ -658,6 +658,10 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv) print_help(imv); imv->quit = true; return true; + case 'v': + printf("Version: %s\n", IMV_VERSION); + imv->quit = true; + return false; case 's': if(!parse_scaling_mode(imv, optarg)) { fprintf(stderr, "Invalid scaling mode. Aborting.\n"); |