aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2025-12-08 09:31:13 +0100
committerGravatar Tim Segers <tsegers@pm.me>2025-12-08 09:31:13 +0100
commita9c31317048a4f1688d253bf158d75bfe068f703 (patch)
tree0656e02a5ab9ce2959ae9c465d0faa397e0052a7 /src
parent86a61b7dec45ddeed4574353b9630e3ff5a7e27c (diff)
downloadtweetpipe-a9c31317048a4f1688d253bf158d75bfe068f703.tar.gz
Add version commandHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/tweetpipe.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tweetpipe.c b/src/tweetpipe.c
index 768faaf..ffeb18b 100644
--- a/src/tweetpipe.c
+++ b/src/tweetpipe.c
@@ -5,9 +5,10 @@
static struct option getopt_long_options[] = {
{ "help", 0, NULL, 'h' }, { "decrypt", 0, NULL, 'd' }, { "encrypt", 0, NULL, 'e' },
{ "in", 1, NULL, 'i' }, { "out", 1, NULL, 'o' }, { "pass", 1, NULL, 'p' },
- { "passfile", 1, NULL, 'P' }, { "passgen", 0, NULL, 'G' }, { NULL, 0, NULL, 0 }
+ { "passfile", 1, NULL, 'P' }, { "passgen", 0, NULL, 'G' }, { "version", 0, NULL, 'v' },
+ { NULL, 0, NULL, 0 }
};
-static const char *getopt_options = "hdeGi:o:p:P:";
+static const char *getopt_options = "hdeGvi:o:p:P:";
static void
usage(FILE *stream)
@@ -316,6 +317,10 @@ options_parse(Context *ctx, int argc, char *argv[])
case 'P':
read_password_file(ctx, optarg);
break;
+ case 'v':
+ printf("%s\n", VERSION_STRING);
+ exit(0);
+ break; /* NOTREACHED */
default:
usage(stderr);
}