{"record":{"id":"7adace142d73d55a","repo":"pcottle/learnGitBranching","slug":"no-documentation-found-for-run-show-command","errorCode":null,"errorMessage":"No documentation found for \"{}\"; run `show commands` to see all available commands","messagePattern":"No documentation found for \"(.+?)\"; run `show commands` to see all available commands","errorType":"exception","errorClass":"CommandProcessError","httpStatus":null,"severity":"warning","filePath":"src/js/sandbox/commands.js","lineNumber":294,"sourceCode":"  Object.keys(mRegexMap).forEach(function(vcs) {\n    var map = mRegexMap[vcs];\n    Object.keys(map).forEach(function(method) {\n      var regex = map[method];\n      allCommands[vcs + ' ' + method] = regex;\n    });\n  });\n  toDelete.forEach(function(key) {\n    delete allCommands[key];\n  });\n\n  return allCommands;\n};\n\n// shared handler for `help {command}` and `git help {command}`\nvar showHelpForCommand = function(target) {\n  var lines = getCommandHelpLines(target);\n  if (!lines) {\n    throw new CommandProcessError({\n      msg: intl.todo(\n        'No documentation found for \"' + target + '\"; ' +\n        'run `show commands` to see all available commands'\n      )\n    });\n  }\n\n  throw new CommandResult({\n    msg: lines.join('\\n')\n  });\n};\n\n// builds the documentation lines for `help {command}`; returns null\n// if we have nothing to say about the given command\nvar getCommandHelpLines = function(target) {\n  var vcsRegexMap = Commands.commands.getRegexMap();\n  var descriptionMap = Commands.commands.getDescriptionMap();\n  var optionMap = Commands.commands.getOptionMap();","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/pcottle/learnGitBranching/blob/5b09d0ff9678cad164f5a7488a279a44f90d7256/src/js/sandbox/commands.js#L276-L312","documentation":"showHelpForCommand() in sandbox/commands.js backs both `help {command}` and `git help {command}`. It calls getCommandHelpLines(target); if no documentation lines are registered for that command name, it throws CommandProcessError with an untranslated todo message pointing the user to `show commands`.","triggerScenarios":"Running `help <name>` or `git help <name>` where <name> is not a key in the command documentation table — misspelled names, aliases, or commands with no help entry.","commonSituations":"Typos like `help comit`; asking for help on internal/aliased commands that lack documentation entries; new commands registered without corresponding help lines.","solutions":["Run `show commands` to see documented commands and re-run help with the exact name","Fix the typo in the command name","If extending the sandbox, register help lines for any new command so getCommandHelpLines returns them"],"exampleFix":"// before\nhelp comit\n// after\nhelp commit","handlingStrategy":"type-guard","validationCode":"if (!getCommandHelpLines(target)) { inform(`no docs for ${target}; try \\`show commands\\``); } else { showHelpForCommand(target); }","typeGuard":"function hasDocs(name) {\n  return Boolean(getCommandHelpLines(name));\n}","tryCatchPattern":"try { showHelpForCommand(target); } catch (e) { if (e instanceof CommandProcessError) { listCommands(); } else throw e; }","preventionTips":["Autocomplete/validate command names against the documented list before help lookups","Register help lines whenever adding a new command"],"tags":["help","unknown-command","sandbox"],"backgroundTag":"unknown-command-help","analyzedSha":"5b09d0ff9678cad164f5a7488a279a44f90d7256","analyzedAt":"2026-08-27T13:53:49.057Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}