summaryrefslogtreecommitdiff
path: root/src/shell_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-03-25 16:47:19 +1100
committerMaxime Coste <mawww@kakoune.org>2018-03-25 16:47:19 +1100
commit49c52b025f2cb5bd66f729f873d2e690b613fb39 (patch)
tree2181f8cc2c43646abbfdc213991028c406d33649 /src/shell_manager.cc
parent435b5b7ff97c7e52d50c002c9480af7066ead2ad (diff)
Remove contains_that and use any_of to be closer to the c++ stdlib
Diffstat (limited to 'src/shell_manager.cc')
-rw-r--r--src/shell_manager.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc
index c0ae5b10..11d2b0cc 100644
--- a/src/shell_manager.cc
+++ b/src/shell_manager.cc
@@ -126,10 +126,10 @@ Vector<String> generate_env(StringView cmdline, const Context& context, const Sh
StringView name{(*it)[1].first, (*it)[1].second};
auto match_name = [&](const String& s) {
- return s.length() > name.length() and
- prefix_match(s, name) and s[name.length()] == '=';
+ return s.substr(0_byte, name.length()) == name and
+ s.substr(name.length(), 1_byte) == "=";
};
- if (contains_that(kak_env, match_name))
+ if (any_of(kak_env, match_name))
continue;
auto var_it = shell_context.env_vars.find(name);