summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-04-17 19:26:44 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-04-17 19:26:44 +0200
commitb229584e95c1997968bca84c37a283293db7ce1f (patch)
tree6b12d82f929fe9b71c7cc66e12e613cddd7435c0 /src
parent0a8f51bddd70d97bd1853de835d30f5be162ae60 (diff)
ShellManager: env_var_regex is an implementation detail
Diffstat (limited to 'src')
-rw-r--r--src/shell_manager.cc6
-rw-r--r--src/shell_manager.hh1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc
index 545bed07..f85ec92e 100644
--- a/src/shell_manager.cc
+++ b/src/shell_manager.cc
@@ -9,10 +9,10 @@
namespace Kakoune
{
-String env_var_regex(R"(\$\{kak_(\w+)[^}]*\}|\$kak_(\w+))");
+
+static const Regex env_var_regex(R"(\$\{kak_(\w+)[^}]*\}|\$kak_(\w+))");
ShellManager::ShellManager()
- : m_regex(env_var_regex.begin(), env_var_regex.end())
{
}
@@ -79,7 +79,7 @@ String ShellManager::pipe(const String& input,
dup2(error_pipe[1], 2); close(error_pipe[1]);
dup2(write_pipe[0], 0); close(write_pipe[0]);
- boost::regex_iterator<String::const_iterator> it(cmdline.begin(), cmdline.end(), m_regex);
+ boost::regex_iterator<String::const_iterator> it(cmdline.begin(), cmdline.end(), env_var_regex);
boost::regex_iterator<String::const_iterator> end;
while (it != end)
diff --git a/src/shell_manager.hh b/src/shell_manager.hh
index 2e4bae80..fce3e0af 100644
--- a/src/shell_manager.hh
+++ b/src/shell_manager.hh
@@ -30,7 +30,6 @@ public:
void register_env_var(const String& regex, EnvVarRetriever retriever);
private:
- Regex m_regex;
std::vector<std::pair<Regex, EnvVarRetriever>> m_env_vars;
};