summaryrefslogtreecommitdiff
path: root/src/file.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-03-25 00:14:56 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-03-25 20:38:26 +0000
commitd3ef2d36ead57e6a0490cebba3cdbc434c729e24 (patch)
treeaf4b0c911d3593d6d3104a66974649ca14537f11 /src/file.cc
parent87704227ad9bef1d09ed3620977d106bf0a16485 (diff)
Add a SplitView container view
Diffstat (limited to 'src/file.cc')
-rw-r--r--src/file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file.cc b/src/file.cc
index 6cf9a735..a558dc29 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -449,7 +449,7 @@ Vector<String> complete_command(StringView prefix, ByteCount cursor_pos)
static UnorderedMap<String, CommandCache, MemoryDomain::Commands> command_cache;
Vector<RankedMatch> matches;
- for (auto dir : split(getenv("PATH"), ':'))
+ for (auto dir : StringView{getenv("PATH")} | split<StringView>(':'))
{
auto dirname = ((not dir.empty() and dir.back() == '/') ? dir.substr(0, dir.length()-1) : dir).str();