/*
- * PLink - a command-line (stdin/stdout) variant of PuTTY.
+ * PLink - a Windows command-line (stdin/stdout) variant of PuTTY.
*/
#include <stdio.h>
printf("Usage: plink [options] [user@]host [command]\n");
printf(" (\"host\" can also be a PuTTY saved session name)\n");
printf("Options:\n");
+ printf(" -V print version information\n");
printf(" -v show verbose messages\n");
printf(" -load sessname Load settings from saved session\n");
printf(" -ssh -telnet -rlogin -raw\n");
exit(1);
}
+static void version(void)
+{
+ printf("plink: %s\n", ver);
+ exit(1);
+}
+
char *do_select(SOCKET skt, int startup)
{
int events;
} 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;