mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +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
|
@ -29,6 +29,7 @@ protected:
|
|||
/* Flags. */
|
||||
struct Flag
|
||||
{
|
||||
char shortName;
|
||||
std::string description;
|
||||
Strings labels;
|
||||
size_t arity;
|
||||
|
@ -63,7 +64,7 @@ public:
|
|||
const Strings & labels, const std::string & description,
|
||||
size_t arity, std::function<void(Strings)> handler)
|
||||
{
|
||||
auto flag = Flag{description, labels, arity, handler};
|
||||
auto flag = Flag{shortName, description, labels, arity, handler};
|
||||
if (shortName) shortFlags[shortName] = flag;
|
||||
longFlags[longName] = flag;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue