Fix arity of --exclude flag in nix search

Due to incorrectly using the Handler(vector<string>*) constructor the
`--exclude` flag would swallow all proceeding arguments instead of just
one.
This commit is contained in:
Fishhh 2022-06-20 18:00:32 +02:00
parent 7e301fd74e
commit 4ade8a5f25
No known key found for this signature in database
GPG Key ID: FDB7055C732D177D

View File

@ -34,7 +34,9 @@ struct CmdSearch : InstallableCommand, MixJSON
.shortName = 'e', .shortName = 'e',
.description = "Hide packages whose attribute path, name or description contain *regex*.", .description = "Hide packages whose attribute path, name or description contain *regex*.",
.labels = {"regex"}, .labels = {"regex"},
.handler = Handler(&excludeRes), .handler = {[this](std::string s) {
excludeRes.push_back(s);
}},
}); });
} }