I've written a simple patch to add the -V / --version option to lsh to
print out the version of lsh being used. Patch is against 0.2.9.
J.
--
Web [ "Save usenet: rmgroup ox.colleges.keble" -- Simon Cozens, ]
site: http:// [ ox.test ] Made by
www.earth.li/~noodles/ [ ] HuggieTag 0.8.6
--- lsh-0.2.9/src/lsh.c Tue Feb 8 21:22:46 2000
+++ lsh-0.2.9-version/src/lsh.c Fri Feb 18 15:35:52 2000
@@ -47,6 +47,7 @@
#include "ssh.h"
#include "tcpforward_commands.h"
#include "tty.h"
+#include "version.h"
#include "werror.h"
#include "xalloc.h"
@@ -657,6 +658,7 @@
#endif /* WITH_PTY_SUPPORT */
{ NULL, 0, NULL, 0, "Universal not:", 0 },
{ "no", 'n', NULL, 0, "Inverts the effect of the next modifier", 0 },
+ { "version", 'V', NULL, 0, "Display version number only.", 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -938,6 +940,11 @@
self->with_pty = 1;
break;
#endif /* WITH_PTY_SUPPORT */
+
+ case 'V':
+ printf("LSH Version %s, protocol version %s\n", VERSION,
+CLIENT_PROTOCOL_VERSION);
+ exit(0);
+ break;
case 'n':
self->not = !self->not;