Commit 95561c1c authored by twanvl's avatar twanvl

simple :info command for dumping set info from CLI

parent a1e2b428
...@@ -135,6 +135,15 @@ void CLISetInterface::handleCommand(const String& command) { ...@@ -135,6 +135,15 @@ void CLISetInterface::handleCommand(const String& command) {
ei.exported_images.clear(); ei.exported_images.clear();
ctx.closeScope(scope); ctx.closeScope(scope);
scope = ctx.openScope(); scope = ctx.openScope();
} else if (before == _(":i") || before == _(":info")) {
if (set) {
cli << _("set: ") << set->identification() << ENDL;
cli << _("filename: ") << set->absoluteFilename() << ENDL;
cli << _("relative: ") << set->relativeFilename() << ENDL;
cli << String::Format(_("#cards: %d"), set->cards.size()) << ENDL;
} else {
cli << _("No set loaded") << ENDL;
}
} else if (before == _(":c") || before == _(":cd")) { } else if (before == _(":c") || before == _(":cd")) {
if (arg.empty()) { if (arg.empty()) {
cli.showError(_("Give a new working directory.")); cli.showError(_("Give a new working directory."));
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
const Char* BRIGHT = _("\x1B[1m"); const Char* BRIGHT = _("\x1B[1m");
const Char* NORMAL = _("\x1B[0m"); const Char* NORMAL = _("\x1B[0m");
const Char* PARAM = _("\x1B[33m"); const Char* PARAM = _("\x1B[36m");
const Char* FILE_EXT = _("\x1B[0;1m"); const Char* FILE_EXT = _("\x1B[0;1m");
const Char* GRAY = _("\x1B[1;30m"); const Char* GRAY = _("\x1B[1;30m");
const Char* RED = _("\x1B[1;31m"); const Char* RED = _("\x1B[1;31m");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment