gobject-query: Add a --version argument

This has been documented in `man gobject-query` for a long time, but
seemingly never implemented.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-06-09 13:25:35 +01:00
parent 6211e25953
commit fbdbbfa580

View File

@ -170,6 +170,11 @@ main (gint argc,
{
gen_tree = 1;
}
else if (strcmp ("--version", argv[i]) == 0)
{
g_print (PACKAGE_VERSION "\n");
return 0;
}
else if (strcmp ("-h", argv[i]) == 0 ||
strcmp ("--help", argv[i]) == 0)
{