X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/6cc170f02be245cb3269b2512f9e8a9373cc0c55..dc108ebccfec3f75989081e31c248790824cb856:/plink.c diff --git a/plink.c b/plink.c index 37113762..d92b6c64 100644 --- a/plink.c +++ b/plink.c @@ -233,6 +233,13 @@ static void usage(void) printf(" -C enable compression\n"); printf(" -i key private key file for authentication\n"); printf(" -s remote command is an SSH subsystem (SSH-2 only)\n"); + printf(" -V print version information\n"); + exit(1); +} + +static void version(void) +{ + printf("plink: %s\n", ver); exit(1); } @@ -326,6 +333,8 @@ int main(int argc, char **argv) } else if (!strcmp(p, "-s")) { /* Save status to write to cfg later. */ use_subsystem = 1; + } else if (!strcmp(p, "-V")) { + version(); } else { fprintf(stderr, "plink: unknown option \"%s\"\n", p); errors = 1;