mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
nix --help: Show short flags
This commit is contained in:
parent
ddea253ff8
commit
1b0088ebb2
2 changed files with 6 additions and 4 deletions
|
@ -71,10 +71,11 @@ void Args::printHelp(const string & programName, std::ostream & out)
|
|||
void Args::printFlags(std::ostream & out)
|
||||
{
|
||||
Table2 table;
|
||||
for (auto & flags : longFlags)
|
||||
for (auto & flag : longFlags)
|
||||
table.push_back(std::make_pair(
|
||||
"--" + flags.first + renderLabels(flags.second.labels),
|
||||
flags.second.description));
|
||||
(flag.second.shortName ? std::string("-") + flag.second.shortName + ", " : " ")
|
||||
+ "--" + flag.first + renderLabels(flag.second.labels),
|
||||
flag.second.description));
|
||||
printTable(out, table);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue