X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/6cc170f02be245cb3269b2512f9e8a9373cc0c55..dc108ebccfec3f75989081e31c248790824cb856:/scp.c diff --git a/scp.c b/scp.c index e2a9cf30..f3aa5e05 100644 --- a/scp.c +++ b/scp.c @@ -2064,6 +2064,7 @@ static void usage(void) printf(" -i key private key file for authentication\n"); printf(" -batch disable all interactive prompts\n"); printf(" -unsafe allow server-side wildcards (DANGEROUS)\n"); + printf(" -V print version information\n"); #if 0 /* * -gui is an internal option, used by GUI front ends to get @@ -2078,6 +2079,12 @@ static void usage(void) cleanup_exit(1); } +void version(void) +{ + printf("pscp: %s\n", ver); + cleanup_exit(1); +} + void cmdline_error(char *p, ...) { va_list ap; @@ -2129,6 +2136,8 @@ int psftp_main(int argc, char *argv[]) statistics = 0; } else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-?") == 0) { usage(); + } else if (strcmp(argv[i], "-V") == 0) { + version(); } else if (strcmp(argv[i], "-gui") == 0 && i + 1 < argc) { gui_enable(argv[++i]); gui_mode = 1;