mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 06:22:42 +01:00
addFlag: use aliases
This commit is contained in:
parent
8ce4287409
commit
74dccef004
3 changed files with 7 additions and 0 deletions
|
|
@ -292,6 +292,7 @@ template<> void BaseSetting<bool>::convertToArg(Args & args, const std::string &
|
|||
{
|
||||
args.addFlag({
|
||||
.longName = name,
|
||||
.aliases = aliases,
|
||||
.description = fmt("Enable the `%s` setting.", name),
|
||||
.category = category,
|
||||
.handler = {[this] { override(true); }},
|
||||
|
|
@ -299,6 +300,7 @@ template<> void BaseSetting<bool>::convertToArg(Args & args, const std::string &
|
|||
});
|
||||
args.addFlag({
|
||||
.longName = "no-" + name,
|
||||
.aliases = aliases,
|
||||
.description = fmt("Disable the `%s` setting.", name),
|
||||
.category = category,
|
||||
.handler = {[this] { override(false); }},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue