mirror of
https://github.com/NixOS/nix.git
synced 2024-11-30 18:52:26 +00:00
Completions::add(): Guard against newlines
This commit is contained in:
parent
ea4b2b985f
commit
59bd6e87a4
@ -19,7 +19,8 @@ void Args::addFlag(Flag && flag_)
|
||||
|
||||
void Completions::add(std::string completion, std::string description)
|
||||
{
|
||||
insert(Completion{
|
||||
assert(description.find('\n') == std::string::npos);
|
||||
insert(Completion {
|
||||
.completion = completion,
|
||||
.description = description
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user