diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-06-03 18:29:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-06-03 18:29:44 -0700 |
commit | b0ae4b903067017ec7dc19f27d3916d2153410af (patch) | |
tree | c1b7f83de32d18a2abffd7af9c56c6e42a27b0a4 /xprop.c | |
parent | faa4fa7785addc2170d4de7bf13d377324597e99 (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |