29 #include <ndn-cxx/util/logger.hpp> 44 os <<
"nfdc [-h|--help] [-V|--version] <command> [<args>]\n\n";
46 os <<
"All subcommands:\n";
49 os <<
"Subcommands starting with " << noun <<
":\n";
52 std::vector<const CommandDefinition*> commands = parser.
listCommands(noun, mode);
53 if (commands.empty()) {
58 for (
auto def : commands) {
59 os <<
" " << def->getNoun() <<
' ' << def->getVerb() <<
' ' 60 <<
text::Spaces{
static_cast<int>(LIST_COMMAND_NAME_COLUMN_WIDTH -
61 def->getNoun().size() - def->getVerb().size() - 2)}
62 << def->getTitle() <<
'\n';
65 os <<
"\nSee 'nfdc help <command>' to read about a specific subcommand.\n";
71 std::string manpage =
"nfdc-" + noun;
73 ::execlp(
"man",
"man", manpage.data(),
nullptr);
74 NDN_LOG_FATAL(
"Error opening man page for " << manpage);
80 auto noun = ctx.
args.
get<std::string>(
"noun",
"");
81 auto verb = ctx.
args.
get<std::string>(
"verb",
"");
97 .
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