]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- use table for printing command line options help 875/head
authorArvin Schnell <aschnell@suse.de>
Mon, 26 Feb 2024 10:38:59 +0000 (11:38 +0100)
committerArvin Schnell <aschnell@suse.de>
Mon, 26 Feb 2024 10:38:59 +0000 (11:38 +0100)
18 files changed:
client/GlobalOptions.cc
client/GlobalOptions.h
client/cmd-cleanup.cc
client/cmd-create-config.cc
client/cmd-create.cc
client/cmd-delete.cc
client/cmd-diff.cc
client/cmd-get-config.cc
client/cmd-list-configs.cc
client/cmd-list.cc
client/cmd-modify.cc
client/cmd-rollback.cc
client/cmd-status.cc
client/cmd-undochange.cc
client/snapper.cc
client/utils/Makefile.am
client/utils/help.cc [new file with mode: 0644]
client/utils/help.h [new file with mode: 0644]

index 9c8d5e00bee5af8c2f328d1d41d9b68fe1ee75b5..0aa42f167fe566458e1f0a86d922a42061d1576c 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <snapper/AppUtil.h>
 
+#include "utils/help.h"
 #include "misc.h"
 #include "client/GlobalOptions.h"
 #include "client/utils/text.h"
@@ -34,27 +35,30 @@ namespace snapper
     using namespace std;
 
 
-    string
-    GlobalOptions::help_text()
+    void
+    GlobalOptions::help_global_options()
     {
-       return string(_("    Global options:")) + '\n'
-           + _("\t--quiet, -q\t\t\tSuppress normal output.") + '\n'
-           + _("\t--verbose, -v\t\t\tIncrease verbosity.") + '\n'
-           + _("\t--debug\t\t\t\tTurn on debugging.") + '\n'
-           + _("\t--utc\t\t\t\tDisplay dates and times in UTC.") + '\n'
-           + _("\t--iso\t\t\t\tDisplay dates and times in ISO format.") + '\n'
-           + _("\t--table-style, -t <style>\tTable style (integer).") + '\n'
-           + _("\t--abbreviate\t\t\tAllow to abbreviate table columns.") + '\n'
-           + _("\t--machine-readable <format>\tSet a machine-readable output format (csv, json).") + '\n'
-           + _("\t--csvout\t\t\tSet CSV output format.") + '\n'
-           + _("\t--jsonout\t\t\tSet JSON output format.") + '\n'
-           + _("\t--separator <separator>\t\tCharacter separator for CSV output format.") + '\n'
-           + _("\t--no-headers\t\t\tNo headers for CSV output format.") + '\n'
-           + _("\t--config, -c <name>\t\tSet name of config to use.") + '\n'
-           + _("\t--no-dbus\t\t\tOperate without DBus.") + '\n'
-           + _("\t--root, -r <path>\t\tOperate on target root (works only without DBus).") + '\n'
-           + _("\t--ambit, -a ambit\t\tOperate in the specified ambit.") + '\n'
-           + _("\t--version\t\t\tPrint version and exit.") + '\n';
+       cout << _("    Global options:") << '\n';
+
+       print_options({
+           { _("--quiet, -q"), _("Suppress normal output.") },
+           { _("--verbose, -v"), _("Increase verbosity.") },
+           { _("--debug"), _("Turn on debugging.") },
+           { _("--utc"), _("Display dates and times in UTC.") },
+           { _("--iso"), _("Display dates and times in ISO format.") },
+           { _("--table-style, -t <style>"), _("Table style (integer).") },
+           { _("--abbreviate"), _("Allow to abbreviate table columns.") },
+           { _("--machine-readable <format>"), _("Set a machine-readable output format (csv, json).") },
+           { _("--csvout"), _("Set CSV output format.") },
+           { _("--jsonout"), _("Set JSON output format.") },
+           { _("--separator <separator>"), _("Character separator for CSV output format.") },
+           { _("--no-headers"), _("No headers for CSV output format.") },
+           { _("--config, -c <name>"), _("Set name of config to use.") },
+           { _("--no-dbus"), _("Operate without DBus.") },
+           { _("--root, -r <path>"), _("Operate on target root (works only without DBus).") },
+           { _("--ambit, -a <ambit>"), _("Operate in the specified ambit.") },
+           { _("--version"), _("Print version and exit.") }
+       });
     }
 
 
index ba24d40f9695d4c95d35d560e7bf4ebdc7d4ddee..4b4c3e339e16a029a354f0210c2de4a4c23716d1 100644 (file)
@@ -41,7 +41,7 @@ namespace snapper
        enum class OutputFormat { TABLE, CSV, JSON };
        enum class Ambit { AUTO, CLASSIC, TRANSACTIONAL };
 
-       static string help_text();
+       static void help_global_options();
 
        GlobalOptions(GetOpts& get_opts);
 
index 42e28b126cf778a72f80174cf29e02bfc02fa3b7..cf5f0b08cabc2a9401ea7db7d7bd29f57490f742 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "utils/HumanString.h"
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "cleanup.h"
@@ -53,10 +54,12 @@ namespace snapper
        cout << _("  Cleanup snapshots:") << '\n'
             << _("\tsnapper cleanup <cleanup-algorithm>") << '\n'
             << '\n'
-            << _("    Options for 'cleanup' command:") << '\n'
-            << _("\t--path <path>\t\t\tCleanup all configs affecting path.") << '\n'
-            << _("\t--free-space <space>\t\tTry to make space available.") << '\n'
-            << endl;
+            << _("    Options for 'cleanup' command:") << '\n';
+
+       print_options({
+           { _("--path <path>"), _("Cleanup all configs affecting path.") },
+           { _("--free-space <space>"), _("Try to make space available.") }
+       });
     }
 
 
index ed6e2f73df796526303baff2bb81cee2e9a1ccd5..c1e700841c844f8b170801e83b2128c83b943e7a 100644 (file)
@@ -26,6 +26,7 @@
 #include <snapper/AppUtil.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 
@@ -42,10 +43,12 @@ namespace snapper
        cout << _("  Create config:") << '\n'
             << _("\tsnapper create-config <subvolume>") << '\n'
             << '\n'
-            << _("    Options for 'create-config' command:") << '\n'
-            << _("\t--fstype, -f <fstype>\t\tManually set filesystem type.") << '\n'
-            << _("\t--template, -t <name>\t\tName of config template to use.") << '\n'
-            << endl;
+            << _("    Options for 'create-config' command:") << '\n';
+
+       print_options({
+           { _("--fstype, -f <fstype>"), _("Manually set filesystem type.") },
+           { _("--template, -t <name>"), _("Name of config template to use.") }
+       });
     }
 
 
index d003eb7c7e6019f490f8eef4a6dc6b988c5cf954..aebc1770f73e7f0c95b08410c48bb0639e219b04 100644 (file)
@@ -26,6 +26,7 @@
 #include <snapper/AppUtil.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "misc.h"
@@ -43,18 +44,20 @@ namespace snapper
        cout << _("  Create snapshot:") << '\n'
             << _("\tsnapper create") << '\n'
             << '\n'
-            << _("    Options for 'create' command:") << '\n'
-            << _("\t--type, -t <type>\t\tType for snapshot.") << '\n'
-            << _("\t--pre-number <number>\t\tNumber of corresponding pre snapshot.") << '\n'
-            << _("\t--print-number, -p\t\tPrint number of created snapshot.") << '\n'
-            << _("\t--description, -d <description>\tDescription for snapshot.") << '\n'
-            << _("\t--cleanup-algorithm, -c <algo>\tCleanup algorithm for snapshot.") << '\n'
-            << _("\t--userdata, -u <userdata>\tUserdata for snapshot.") << '\n'
-            << _("\t--command <command>\t\tRun command and create pre and post snapshots.") << endl
-            << _("\t--read-only\t\t\tCreate read-only snapshot.") << '\n'
-            << _("\t--read-write\t\t\tCreate read-write snapshot.") << '\n'
-            << _("\t--from <number>\t\t\tCreate a snapshot from the specified snapshot.") << '\n'
-            << endl;
+            << _("    Options for 'create' command:") << '\n';
+
+       print_options({
+           { _("--type, -t <type>"), _("Type for snapshot.") },
+           { _("--pre-number <number>"), _("Number of corresponding pre snapshot.") },
+           { _("--print-number, -p"), _("Print number of created snapshot.") },
+           { _("--description, -d <description>"), _("Description for snapshot.") },
+           { _("--cleanup-algorithm, -c <algo>"), _("Cleanup algorithm for snapshot.") },
+           { _("--userdata, -u <userdata>"), _("Userdata for snapshot.") },
+           { _("--command <command>"), _("Run command and create pre and post snapshots.")},
+           { _("--read-only"), _("Create read-only snapshot.") },
+           { _("--read-write"), _("Create read-write snapshot.") },
+           { _("--from <number>"), _("Create a snapshot from the specified snapshot.") }
+       });
     }
 
 
index 28d652455ef169b8391c55f539bc17d60eb0ec71..5288512c5b30f80495a07977f4616ca56a0700f9 100644 (file)
@@ -26,6 +26,7 @@
 #include <snapper/AppUtil.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 
@@ -42,9 +43,11 @@ namespace snapper
        cout << _("  Delete snapshot:") << '\n'
             << _("\tsnapper delete <number>") << '\n'
             << '\n'
-            << _("    Options for 'delete' command:") << '\n'
-            << _("\t--sync, -s\t\t\tSync after deletion.") << '\n'
-            << endl;
+            << _("    Options for 'delete' command:") << '\n';
+
+       print_options({
+           { _("--sync, -s"), _("Sync after deletion.") }
+       });
     }
 
 
index 2bd116cf8f81330880787b3a2ca1f2ac5e366fc1..dd80dd1937578e37ceb76c030c5fca553f24b67d 100644 (file)
@@ -26,6 +26,7 @@
 #include <snapper/AppUtil.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "misc.h"
@@ -44,11 +45,13 @@ namespace snapper
        cout << _("  Comparing snapshots:") << '\n'
             << _("\tsnapper diff <number1>..<number2> [files]") << '\n'
             << '\n'
-            << _("    Options for 'diff' command:") << '\n'
-            << _("\t--input, -i <file>\t\tRead files to diff from file.") << '\n'
-            << _("\t--diff-cmd <command>\t\tCommand used for comparing files.") << '\n'
-            << _("\t--extensions, -x <options>\tExtra options passed to the diff command.") << '\n'
-            << endl;
+            << _("    Options for 'diff' command:") << '\n';
+
+       print_options({
+           { _("--input, -i <file>"), _("Read files to diff from file.") },
+           { _("--diff-cmd <command>"), _("Command used for comparing files.") },
+           { _("--extensions, -x <options>"), _("Extra options passed to the diff command.") }
+       });
     }
 
 
index bd4ee222747fc45b5558087d62a8cf9de96d6a94..19fe2ff3dcdb7390d6aa7834122841b3c70756bb 100644 (file)
@@ -24,6 +24,7 @@
 #include <iostream>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "misc.h"
@@ -44,11 +45,11 @@ namespace snapper
        cout << _("  Get config:") << '\n'
             << _("\tsnapper get-config") << '\n'
             << '\n'
-            << _("    Options for 'get-config' command:") << '\n'
-            << _("\t--columns <columns>\t\tColumns to show separated by comma.\n"
-                 "\t\t\t\t\tPossible columns: key, value.\n"
-                 "\t\t\t\t\tColumns are not selected when JSON format is used.") << '\n'
-            << endl;
+            << _("    Options for 'get-config' command:") << '\n';
+
+       print_options({
+           { _("--columns <columns>"), _("Columns to show separated by comma.") }
+       });
     }
 
 
index b4d6ecaf8f2f1f855f8e9fd5bdd0b6a12ddbb408..4cfde2b668a630ae4dc0a5304922c38676dc87d7 100644 (file)
@@ -24,6 +24,7 @@
 #include <iostream>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "misc.h"
@@ -44,10 +45,11 @@ namespace snapper
        cout << _("  List configs:") << '\n'
             << _("\tsnapper list-configs") << '\n'
             << '\n'
-            << _("    Options for 'list-configs' command:\n"
-                 "\t--columns <columns>\t\tColumns to show separated by comma.\n"
-                 "\t\t\t\t\tPossible columns: config, subvolume.\n")
-            << endl;
+            << _("    Options for 'list-configs' command:") << '\n';
+
+       print_options({
+           { _("--columns <columns>"), _("Columns to show separated by comma.") }
+       });
     }
 
 
index 5725e0ad98931cec0cde84122913342d05e3ef61..96e6e51a7414c164bf92cad57b7ce8f988e01bd1 100644 (file)
@@ -30,6 +30,7 @@
 #include <snapper/BtrfsUtils.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "locker.h"
@@ -53,15 +54,14 @@ namespace snapper
        cout << _("  List snapshots:") << '\n'
             << _("\tsnapper list") << '\n'
             << '\n'
-            << _("    Options for 'list' command:") << '\n'
-            << _("\t--type, -t <type>\t\tType of snapshots to list.") << '\n'
-            << _("\t--disable-used-space\t\tDisable showing used space.") << '\n'
-            << _("\t--all-configs, -a\t\tList snapshots from all accessible configs.") << '\n'
-            << _("\t--columns <columns>\t\tColumns to show separated by comma.\n"
-                 "\t\t\t\t\tPossible columns: config, subvolume, number, default, active,\n"
-                 "\t\t\t\t\ttype, date, user, used-space, cleanup, description, userdata,\n"
-                 "\t\t\t\t\tpre-number, post-number, post-date, read-only.") << '\n'
-            << endl;
+            << _("    Options for 'list' command:") << '\n';
+
+       print_options({
+           { _("--type, -t <type>"), _("Type of snapshots to list.") },
+           { _("--disable-used-space"), _("Disable showing used space.") },
+           { _("--all-configs, -a"), _("List snapshots from all accessible configs.") },
+           { _("--columns <columns>"), _("Columns to show separated by comma." ) }
+       });
     }
 
 
index bc66630f6495d0190ebe942a21731203d510e4f3..0671259eba90b860cb9bd545e82f2dda36a10953 100644 (file)
@@ -26,6 +26,7 @@
 #include <snapper/Filesystem.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "misc.h"
@@ -43,14 +44,16 @@ namespace snapper
        cout << _("  Modify snapshot:") << '\n'
             << _("\tsnapper modify <number>") << '\n'
             << '\n'
-            << _("    Options for 'modify' command:") << '\n'
-            << _("\t--description, -d <description>\tDescription for snapshot.") << '\n'
-            << _("\t--cleanup-algorithm, -c <algo>\tCleanup algorithm for snapshot.") << '\n'
-            << _("\t--userdata, -u <userdata>\tUserdata for snapshot.") << '\n'
-            << _("\t--read-only\t\t\tSet snapshot read-only.") << '\n'
-            << _("\t--read-write\t\t\tSet snapshot read-write.") << '\n'
-            << _("\t--default\t\t\tSet snapshot as default snapshot.") << '\n'
-            << endl;
+            << _("    Options for 'modify' command:") << '\n';
+
+       print_options({
+           { _("--description, -d <description>"), _("Description for snapshot.") },
+           { _("--cleanup-algorithm, -c <algo>"), _("Cleanup algorithm for snapshot.") },
+           { _("--userdata, -u <userdata>"), _("Userdata for snapshot.") },
+           { _("--read-only"), _("Set snapshot read-only.") },
+           { _("--read-write"), _("Set snapshot read-write.") },
+           { _("--default"), _("Set snapshot as default snapshot.") },
+       });
     }
 
 
index b2b854d5950febe9b5486a095cd52642c42ed8b9..3075d5037a023419f915783f47473a4824b9cf31 100644 (file)
@@ -30,6 +30,7 @@
 #include <snapper/PluginsImpl.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "misc.h"
@@ -49,12 +50,14 @@ namespace snapper
        cout << _("  Rollback:") << '\n'
             << _("\tsnapper rollback [number]") << '\n'
             << '\n'
-            << _("    Options for 'rollback' command:") << '\n'
-            << _("\t--print-number, -p\t\tPrint number of second created snapshot.") << '\n'
-            << _("\t--description, -d <description>\tDescription for snapshots.") << '\n'
-            << _("\t--cleanup-algorithm, -c <algo>\tCleanup algorithm for snapshots.") << '\n'
-            << _("\t--userdata, -u <userdata>\tUserdata for snapshots.") << '\n'
-            << endl;
+            << _("    Options for 'rollback' command:") << '\n';
+
+       print_options({
+           { _("--print-number, -p"), _("Print number of second created snapshot.") },
+           { _("--description, -d <description>"), _("Description for snapshots.") },
+           { _("--cleanup-algorithm, -c <algo>"), _("Cleanup algorithm for snapshots.") },
+           { _("--userdata, -u <userdata>"), _("Userdata for snapshots.") }
+       });
     }
 
 
index 6f286a706e55f1ee3b22a9daac3f2ed105774187..d0cd6d8fe90487e7ed543089f01945d7113a351f 100644 (file)
@@ -26,6 +26,7 @@
 #include <snapper/AppUtil.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "MyFiles.h"
@@ -43,9 +44,11 @@ namespace snapper
        cout << _("  Comparing snapshots:") << '\n'
             << _("\tsnapper status <number1>..<number2>") << '\n'
             << '\n'
-            << _("    Options for 'status' command:") << '\n'
-            << _("\t--output, -o <file>\t\tSave status to file.") << '\n'
-            << endl;
+            << _("    Options for 'status' command:") << '\n';
+
+       print_options({
+           { _("--output, -o <file>"), _("Save status to file.") }
+       });
     }
 
 
index 01e804ae8081b4ed19a753cd3a4cc1cb4c360193..dee27e3b165d69b2d505ddc50304dd39aa2b9d5f 100644 (file)
@@ -26,6 +26,7 @@
 #include <snapper/AppUtil.h>
 
 #include "utils/text.h"
+#include "utils/help.h"
 #include "GlobalOptions.h"
 #include "proxy.h"
 #include "MyFiles.h"
@@ -43,9 +44,11 @@ namespace snapper
        cout << _("  Undo changes:") << '\n'
             << _("\tsnapper undochange <number1>..<number2> [files]") << '\n'
             << '\n'
-            << _("    Options for 'undochange' command:") << '\n'
-            << _("\t--input, -i <file>\t\tRead files for which to undo changes from file.") << '\n'
-            << endl;
+            << _("    Options for 'undochange' command:") << '\n';
+
+       print_options({
+           { _("--input, -i <file>"), _("Read files for which to undo changes from file.") }
+       });
     }
 
 
index 72e534d319987f152a2f16ecbeda6ef166b9ae95..c8d4c342490e8489f724a1ae77bbe7fd21aabad5 100644 (file)
@@ -116,7 +116,7 @@ help(const vector<Cmd>& cmds, GetOpts& get_opts)
     cout << _("usage: snapper [--global-options] <command> [--command-options] [command-arguments]") << '\n'
         << endl;
 
-    cout << GlobalOptions::help_text() << endl;
+    GlobalOptions::help_global_options();
 
     for (const Cmd& cmd : cmds)
        (*cmd.help_func)();
index bc6200e0b96f899f012d0ffa7ce94097961c6385..e6a99680a6b7b6d2238005f2d0bc33289cc9cc81 100644 (file)
@@ -6,18 +6,18 @@ AM_CPPFLAGS = -I$(top_srcdir)
 
 noinst_LTLIBRARIES = libutils.la
 
-libutils_la_SOURCES =                          \
-       Table.cc            Table.h             \
-       text.cc             text.h              \
-       console.cc          console.h           \
-       equal-date.cc       equal-date.h        \
-       GetOpts.cc          GetOpts.h           \
-       Range.cc            Range.h             \
-       HumanString.cc      HumanString.h       \
-       Limit.cc            Limit.h             \
-       TableFormatter.cc   TableFormatter.h    \
-       CsvFormatter.cc     CsvFormatter.h      \
-       JsonFormatter.cc    JsonFormatter.h
+libutils_la_SOURCES =                                  \
+       Table.cc                Table.h                 \
+       text.cc                 text.h                  \
+       help.cc                 help.h                  \
+       console.cc              console.h               \
+       equal-date.cc           equal-date.h            \
+       GetOpts.cc              GetOpts.h               \
+       Range.cc                Range.h                 \
+       HumanString.cc          HumanString.h           \
+       Limit.cc                Limit.h                 \
+       TableFormatter.cc       TableFormatter.h        \
+       CsvFormatter.cc         CsvFormatter.h          \
+       JsonFormatter.cc        JsonFormatter.h
 
 libutils_la_LIBADD = ../../snapper/libsnapper.la -ltinfo
-
diff --git a/client/utils/help.cc b/client/utils/help.cc
new file mode 100644 (file)
index 0000000..3e1b113
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2024 SUSE LLC
+ *
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may
+ * find current contact information at www.novell.com.
+ */
+
+
+#include <iostream>
+
+#include "help.h"
+#include "Table.h"
+#include "text.h"
+
+
+namespace snapper
+{
+
+    void
+    print_options(std::initializer_list<std::initializer_list<string>> init)
+    {
+       Table table({ Cell(_("Name"), Id::NAME), Cell(_("Description"), Id::DESCRIPTION) });
+       table.set_show_header(false);
+       table.set_show_grid(false);
+       table.set_global_indent(8);
+       table.set_min_width(Id::NAME, 28);
+
+       for (const std::initializer_list<string>& row_init : init)
+           table.add(Table::Row(table, row_init));
+
+       cout << table << '\n';
+    }
+
+}
diff --git a/client/utils/help.h b/client/utils/help.h
new file mode 100644 (file)
index 0000000..24ed3b0
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2024 SUSE LLC
+ *
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may
+ * find current contact information at www.novell.com.
+ */
+
+
+#ifndef SNAPPER_HELP_H
+#define SNAPPER_HELP_H
+
+
+#include <initializer_list>
+#include <string>
+
+
+namespace snapper
+{
+
+    using namespace std;
+
+
+    void
+    print_options(std::initializer_list<std::initializer_list<string>> init);
+
+}
+
+
+#endif