diff options
Diffstat (limited to 'src/shell_manager.cc')
| -rw-r--r-- | src/shell_manager.cc | 6 |
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); |
