aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.cc
diff options
context:
space:
mode:
authorPhilipp Jungkamp <p.jungkamp@gmx.net>2023-02-10 22:17:09 +0100
committerPhilipp Jungkamp <p.jungkamp@gmx.net>2023-02-10 22:17:09 +0100
commit30edd7af532bb893f76d5d4e7ec0fadfcdc941c6 (patch)
treef2e3d7eef3327e9a366ae0ded63a4016978ddb50 /src/libutil/args.cc
parenta537095e1f42d3de726e3c4d8bfc018a4c43ad86 (diff)
Completions::add use libutil trim()
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r--src/libutil/args.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc
index 348f1bca0..35686a8aa 100644
--- a/src/libutil/args.cc
+++ b/src/libutil/args.cc
@@ -29,8 +29,7 @@ void Args::removeFlag(const std::string & longName)
void Completions::add(std::string completion, std::string description)
{
- // strip whitespace/empty lines from the front of the description
- description.erase(0, description.find_first_not_of(" \t\n"));
+ description = trim(description);
// ellipsize overflowing content on the back of the description
auto end_index = description.find_first_of(".\n");
if (end_index != std::string::npos) {