about summary refs log tree commit diff stats
path: root/subx/001help.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-20 17:08:55 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-20 17:08:55 -0700
commit0ca791cd8cb84f71da011b3f3827c61126011492 (patch)
tree8f6b27c56284c267dff5e2c2f6c122fa9bf220eb /subx/001help.cc
parent3fa78f1c16714cf39e388757a046ed4e010ef2b9 (diff)
downloadmu-0ca791cd8cb84f71da011b3f3827c61126011492.tar.gz
4376 - subx: online help includes supported opcodes
Diffstat (limited to 'subx/001help.cc')
-rw-r--r--subx/001help.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/subx/001help.cc b/subx/001help.cc
index e6e0527d..340f7d33 100644
--- a/subx/001help.cc
+++ b/subx/001help.cc
@@ -15,12 +15,14 @@ if (is_equal(argv[1], "help")) {
     help_contents();
     return 0;
   }
-  else if (contains_key(Help, argv[2])) {
-    cerr << get(Help, argv[2]);
+  string key(argv[2]);
+  // End Help Special-cases(key)
+  if (contains_key(Help, key)) {
+    cerr << get(Help, key);
     return 0;
   }
   else {
-    cerr << "No help found for '" << argv[2] << "'\n";
+    cerr << "No help found for '" << key << "'\n";
     help_contents();
     cerr << "Please check your command for typos.\n";
     return 1;