simple :info command for dumping set info from CLI

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1250 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-12-11 17:53:21 +00:00
parent 156e592636
commit 310dc1333d
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -135,6 +135,15 @@ void CLISetInterface::handleCommand(const String& command) {
ei.exported_images.clear();
ctx.closeScope(scope);
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")) {
if (arg.empty()) {
cli.showError(_("Give a new working directory."));