[glib: 7/9] gobject-query: Add a --version argument




commit fbdbbfa5803c9aed0c9e60f80f79dc0c8aacaa2d
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Jun 9 13:25:35 2022 +0100

    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>

 gobject/gobject-query.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gobject/gobject-query.c b/gobject/gobject-query.c
index 1bb5519917..cd43eae4e9 100644
--- a/gobject/gobject-query.c
+++ b/gobject/gobject-query.c
@@ -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)
        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]