summaryrefslogtreecommitdiff
path: root/xprop.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-06-03 18:29:44 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-06-03 18:29:44 -0700
commitb0ae4b903067017ec7dc19f27d3916d2153410af (patch)
treec1b7f83de32d18a2abffd7af9c56c6e42a27b0a4 /xprop.c
parentfaa4fa7785addc2170d4de7bf13d377324597e99 (diff)
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xprop.c')
-rw-r--r--xprop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xprop.c b/xprop.c
index 3885ddc..a4ee2c9 100644
--- a/xprop.c
+++ b/xprop.c
@@ -1785,7 +1785,8 @@ usage (const char *errmsg)
" -fs filename where to look for formats for properties\n"
" -frame don't ignore window manager frames\n"
" -f propname format [dformat] formats to use for property of given name\n"
-" -spy examine window properties forever\n";
+" -spy examine window properties forever\n"
+" -version print program version\n";
fflush (stdout);
@@ -1970,6 +1971,10 @@ main (int argc, char **argv)
Parse_Format_Mapping(&argc, &argv);
continue;
}
+ if (!strcmp(argv[0], "-version")) {
+ puts(PACKAGE_STRING);
+ exit(0);
+ }
fprintf (stderr, "%s: unrecognized argument %s\n\n",
program_name, argv[0]);
usage(NULL);