From 1b0088ebb226ab80c91b54c201cc70204b976310 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 Apr 2016 14:34:46 +0200 Subject: nix --help: Show short flags --- src/libutil/args.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libutil/args.hh') diff --git a/src/libutil/args.hh b/src/libutil/args.hh index 4469a046d28a..6aa08aacac9e 100644 --- a/src/libutil/args.hh +++ b/src/libutil/args.hh @@ -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 handler) { - auto flag = Flag{description, labels, arity, handler}; + auto flag = Flag{shortName, description, labels, arity, handler}; if (shortName) shortFlags[shortName] = flag; longFlags[longName] = flag; } -- cgit 1.4.1