aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r--src/libutil/args.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc
index 66d8df085..8bd9c8aeb 100644
--- a/src/libutil/args.cc
+++ b/src/libutil/args.cc
@@ -19,10 +19,11 @@ void Args::addFlag(Flag && flag_)
void Completions::add(std::string completion, std::string description)
{
- insert(Completion{
- .completion = completion,
- .description = description
- });
+ assert(description.find('\n') == std::string::npos);
+ insert(Completion {
+ .completion = completion,
+ .description = description
+ });
}
bool Completion::operator<(const Completion & other) const