aboutsummaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc
index 9da51ec..bc43a93 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -26,7 +26,7 @@
26 26
27#include "FbTk/Theme.hh" 27#include "FbTk/Theme.hh"
28#include "FbTk/I18n.hh" 28#include "FbTk/I18n.hh"
29#include "FbTk/StringUtil.hh" 29#include "FbTk/CommandParser.hh"
30 30
31#ifdef HAVE_CONFIG_H 31#ifdef HAVE_CONFIG_H
32#include "config.h" 32#include "config.h"
@@ -239,6 +239,7 @@ int main(int argc, char **argv) {
239 "-rc <string>\t\t\tuse alternate resource file.\n" 239 "-rc <string>\t\t\tuse alternate resource file.\n"
240 "-version\t\t\tdisplay version and exit.\n" 240 "-version\t\t\tdisplay version and exit.\n"
241 "-info\t\t\t\tdisplay some useful information.\n" 241 "-info\t\t\t\tdisplay some useful information.\n"
242 "-list-commands\t\t\tlist all valid key commands.\n"
242 "-log <filename>\t\t\tlog output to file.\n" 243 "-log <filename>\t\t\tlog output to file.\n"
243 "-help\t\t\t\tdisplay this help text and exit.\n\n", 244 "-help\t\t\t\tdisplay this help text and exit.\n\n",
244 245
@@ -248,6 +249,13 @@ int main(int argc, char **argv) {
248 } else if (arg == "-info" || arg == "-i") { 249 } else if (arg == "-info" || arg == "-i") {
249 showInfo(cout); 250 showInfo(cout);
250 exit(EXIT_SUCCESS); 251 exit(EXIT_SUCCESS);
252 } else if (arg == "-list-commands") {
253 FbTk::CommandParser<void>::CreatorMap cmap = FbTk::CommandParser<void>::instance().creatorMap();
254 FbTk::CommandParser<void>::CreatorMap::const_iterator it = cmap.begin();
255 const FbTk::CommandParser<void>::CreatorMap::const_iterator it_end = cmap.end();
256 for (; it != it_end; ++it)
257 cout << it->first << endl;
258 exit(EXIT_SUCCESS);
251 } else if (arg == "-verbose") { 259 } else if (arg == "-verbose") {
252 FbTk::ThemeManager::instance().setVerbose(true); 260 FbTk::ThemeManager::instance().setVerbose(true);
253 } 261 }