From 30b0209f8d6785c279e0e50173c8b608e9468a2e Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 26 Jul 2023 19:09:18 +0300 Subject: [PATCH] mu-info: add 'topic mu' information; improve manpage Show some more runtime information in the 'mu' topic, and make that the default. Update manpage. --- man/mu-info.1.org | 7 +++---- mu/mu-cmd-info.cc | 45 +++++++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/man/mu-info.1.org b/man/mu-info.1.org index c9307685..1f68e00e 100644 --- a/man/mu-info.1.org +++ b/man/mu-info.1.org @@ -13,13 +13,12 @@ ~mu info~ is the ~mu~ command for getting information about various topics: -- *common*: general mu build information +- *mu*: general mu build information (default) - *store*: information about the message store - *fields*: table with all the query fields and flags -about the mu database. Note -that while running (e.g. ~mu4e~), some of the information may be slightly delayed -due to database caching. +Note that while running (e.g. ~mu4e~), some of the ~store~ information can be +delayed due to database caching. #+include: "common-options.inc" :minlevel 1 diff --git a/mu/mu-cmd-info.cc b/mu/mu-cmd-info.cc index 9d2093bd..f93f80f0 100644 --- a/mu/mu-cmd-info.cc +++ b/mu/mu-cmd-info.cc @@ -21,6 +21,7 @@ #include "mu-cmd.hh" #include +#include #include "utils/mu-utils.hh" #include @@ -85,7 +86,6 @@ colorify(Table& table, const Options& opts) table[0][c].format() .font_color(Color::white) .font_style({FontStyle::bold}); - } @@ -220,23 +220,13 @@ topic_mu(const Options& opts) using namespace tabulate; - info.add_row({"property", "value"}); - info.add_row({"version", std::string{VERSION}}); - info.add_row({"schema-version", mu_format("{}", MU_STORE_SCHEMA_VERSION)}); - info.add_row({"guile-support", -#if BUILD_GUILE - "yes" -#else - "no" -#endif - }); - info.add_row({"readline-support", -#if HAVE_LIBREADLINE - "yes" -#else - "no" -#endif - }); + info.add_row({"property", "value", "description"}); + info.add_row({"mu-version", std::string{VERSION}, + "Mu runtime version"}); + info.add_row({"xapian-version", Xapian::version_string(), + "Xapian runtime version"}); + info.add_row({"schema-version", mu_format("{}", MU_STORE_SCHEMA_VERSION), + "Version of the database schema"}); info.add_row({"cld2-support", #if HAVE_CLD2 @@ -244,7 +234,22 @@ topic_mu(const Options& opts) #else "no" #endif - }); + , "Support searching by language-code?"}); + + info.add_row({"guile-support", +#if BUILD_GUILE + "yes" +#else + "no" +#endif + , "GNU Guile 3.x scripting support?"}); + info.add_row({"readline-support", +#if HAVE_LIBREADLINE + "yes" +#else + "no" +#endif + , "Better 'm server' REPL for debugging?"}); if (!opts.nocolor) colorify(info, opts); @@ -271,7 +276,7 @@ Mu::mu_cmd_info(const Mu::Store& store, const Options& opts) } else if (topic == "mu") { return topic_mu(opts); } else { - topic_store(store, opts); + topic_mu(opts); MaybeAnsi col{!opts.nocolor}; using Color = MaybeAnsi::Color;