X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/90767715ca41354855c3736df8d8a60115e31ba5..cdd310bb1a216ee7713926b6cd813016fe5343ee:/psftp.c diff --git a/psftp.c b/psftp.c index c3fb62ae..20d3ab5d 100644 --- a/psftp.c +++ b/psftp.c @@ -1779,9 +1779,16 @@ static void usage(void) printf(" -C enable compression\n"); printf(" -i key private key file for authentication\n"); printf(" -batch disable all interactive prompts\n"); + printf(" -V print version information\n"); cleanup_exit(1); } +static void version(void) +{ + printf("psftp: %s\n", ver); + cleanup_exit(1); +} + /* * Connect to a host. */ @@ -2010,6 +2017,8 @@ int psftp_main(int argc, char *argv[]) } 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], "-batch") == 0) { console_batch_mode = 1; } else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {