| 212 | } |
| 213 | |
| 214 | bool FullCommandList::helpCommand(ShellState &state, ArgumentValueList &args) const { |
| 215 | bool showFlags = args.getBool("-l"); |
| 216 | if(args.getIndexedCount() >= 1) { |
| 217 | auto name = args.getIndexed(0).getString(); |
| 218 | if(auto command = lookup(name)) { |
| 219 | printHelpFor(command, showFlags, *args.getOutStream()); |
| 220 | } |
| 221 | else { |
| 222 | (*args.getOutStream()) << "Error: command \"" |
| 223 | << name << "\" does not exist\n"; |
| 224 | } |
| 225 | } |
| 226 | else { |
| 227 | for(const auto &kv : commandMap) { |
| 228 | printHelpFor(kv.second, showFlags, *args.getOutStream()); |
| 229 | } |
| 230 | } |
| 231 | return true; |
| 232 | } |
| 233 | |
| 234 | #define PIPE_READ 0 |
| 235 | #define PIPE_WRITE 1 |
nothing calls this directly
no test coverage detected