ShellManager: env_var_regex is an implementation detail

This commit is contained in:
Maxime Coste 2013-04-17 19:26:44 +02:00
parent 0a8f51bddd
commit b229584e95
2 changed files with 3 additions and 4 deletions

View File

@ -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)

View File

@ -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;
};