summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/smproxy.man5
-rw-r--r--smproxy.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/man/smproxy.man b/man/smproxy.man
index 892dbf2..a38d789 100644
--- a/man/smproxy.man
+++ b/man/smproxy.man
@@ -27,7 +27,7 @@
smproxy \- Session Manager Proxy
.SH SYNOPSIS
.B smproxy
-[-clientId id] [-restore saveFile]
+[-clientId id] [-restore saveFile] [-version]
.SH OPTIONS
.TP 8
.B \-clientId \fIid\fP
@@ -35,6 +35,9 @@ Specifies the session ID used by \fIsmproxy\fP in the previous session.
.TP 8
.B \-restore \fIsaveFile\fP
Specifies the file used by \fIsmproxy\fP to save state in the previous session.
+.TP 8
+.B \-version
+Prints the program version and exits.
.SH DESCRIPTION
.PP
\fIsmproxy\fP allows X applications that do not support X11R6 session
diff --git a/smproxy.c b/smproxy.c
index 3ceb880..6e32371 100644
--- a/smproxy.c
+++ b/smproxy.c
@@ -1184,6 +1184,10 @@ main (int argc, char *argv[])
}
restore_filename = argv[i];
continue;
+
+ case 'v':
+ puts (PACKAGE_STRING);
+ exit (0);
}
}
@@ -1192,7 +1196,8 @@ main (int argc, char *argv[])
usage:
fprintf (stderr,
- "usage: %s [-clientId id] [-restore file] [-debug]\n", argv[0]);
+ "usage: %s [-clientId id] [-restore file] [-debug] [-version]\n",
+ argv[0]);
exit (1);
}