From 75e9bbfa43ac1533ec2c523413794f160f26dd6c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 28 Mar 2016 14:16:45 +0100 Subject: [PATCH] Uniquify candidates in -shell-candidates mode --- src/commands.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands.cc b/src/commands.cc index 438a0f94..cdaf41c8 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -866,6 +866,7 @@ void define_command(const ParametersParser& parser, Context& context, const Shel matches.push_back(match); } std::sort(matches.begin(), matches.end()); + matches.erase(std::unique(matches.begin(), matches.end()), matches.end()); CandidateList res; for (auto& m : matches) res.push_back(m.candidate().str());