aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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);
}