28 #include <ndn-cxx/util/logger.hpp> 42 os <<
"nfdc [-h] [-V] <command> [<args>]\n\n";
44 os <<
"All subcommands:\n";
47 os <<
"Subcommands starting with " << noun <<
":\n";
50 std::vector<const CommandDefinition*> commands = parser.
listCommands(noun, mode);
51 if (commands.empty()) {
56 for (
auto def : commands) {
57 os <<
" " << def->getNoun() <<
' ' << def->getVerb() <<
' ' 58 <<
text::Spaces{
static_cast<int>(LIST_COMMAND_NAME_COLUMN_WIDTH -
59 def->getNoun().size() - def->getVerb().size() - 2)}
60 << def->getTitle() <<
'\n';
63 os <<
"\nSee 'nfdc help <command>' to read about a specific subcommand.\n";
67 helpSingle(
const std::string& noun,
const std::string& verb)
69 std::string manpage =
"nfdc-" + noun;
71 execlp(
"man",
"man", manpage.data(),
nullptr);
72 NDN_LOG_FATAL(
"Error opening man page for " << manpage);
78 std::string noun = ctx.
args.
get<std::string>(
"noun",
"");
79 std::string verb = ctx.
args.
get<std::string>(
"verb",
"");
95 .
setTitle(
"display help information")
const CommandArguments & args
std::ostream & out
output stream
context for command execution
int exitCode
program exit code
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
print a number of whitespaces