From 5038c54d371c02a264f5cbef4e092bf4da6ef5f2 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 14 Nov 2025 19:50:19 -0500 Subject: Add -V/--version opt. --- src/opts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/opts.c') diff --git a/src/opts.c b/src/opts.c index 2a5628e..753f7a1 100644 --- a/src/opts.c +++ b/src/opts.c @@ -3,7 +3,7 @@ #include #include "unalf.h" -#define OPTIONS "aeklLopqtvd:x:" +#define OPTIONS "aeklLopqtvVd:x:" /* uncomment to test exclude/include glob lists */ // #define DEBUG_GLOBS @@ -43,6 +43,7 @@ void parse_opts(int argc, char * const *argv) { case 'q': opts.quiet++; break; case 't': opts.testonly++; opts.listonly = 0; break; case 'v': opts.listonly = 1; opts.testonly = 0; opts.verbose_list++; break; + case 'V': puts(VERSION); exit(0); break; case 'd': opts.outdir = optarg; break; case 'x': add_exclude(optarg); break; default: -- cgit v1.2.3