mu-init: improve user output

This commit is contained in:
Dirk-Jan C. Binnema
2023-07-23 21:17:24 +03:00
parent 3337c9babb
commit 85a2490300

View File

@ -64,10 +64,15 @@ Mu::mu_cmd_init(const Options& opts)
return Err(store.error()); return Err(store.error());
if (!opts.quiet) { if (!opts.quiet) {
mu_cmd_info(*store, opts);
std::cout << "database " mu_println("mu has been {} with the following properties:",
<< (opts.init.reinit ? "reinitialized" : "created") opts.init.reinit ? "reinitialized" : "created");
<< "; use the 'index' command to fill/update it.\n"; // mildly hacky
Options opts_copy{opts};
opts_copy.info.topic = "store";
mu_cmd_info(*store, opts_copy);
mu_println("Database is empty. You can use 'mu index' to fill it.");
} }
return Ok(); return Ok();