1
0
Fork 0
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:
Eelco Dolstra 2016-04-21 14:34:46 +02:00
parent ddea253ff8
commit 1b0088ebb2
2 changed files with 6 additions and 4 deletions

View file

@ -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;
}