From 310dc1333de0a9f4321a718e39a8204d685b69cb Mon Sep 17 00:00:00 2001 From: twanvl Date: Thu, 11 Dec 2008 17:53:21 +0000 Subject: [PATCH] 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 --- src/cli/cli_main.cpp | 9 +++++++++ src/cli/text_io_handler.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cli/cli_main.cpp b/src/cli/cli_main.cpp index 7243e95f..69c88be4 100644 --- a/src/cli/cli_main.cpp +++ b/src/cli/cli_main.cpp @@ -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.")); diff --git a/src/cli/text_io_handler.cpp b/src/cli/text_io_handler.cpp index 78bfc96b..52c110f1 100644 --- a/src/cli/text_io_handler.cpp +++ b/src/cli/text_io_handler.cpp @@ -14,7 +14,7 @@ const Char* BRIGHT = _("\x1B[1m"); const Char* NORMAL = _("\x1B[0m"); -const Char* PARAM = _("\x1B[33m"); +const Char* PARAM = _("\x1B[36m"); const Char* FILE_EXT = _("\x1B[0;1m"); const Char* GRAY = _("\x1B[1;30m"); const Char* RED = _("\x1B[1;31m");