diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cstore/cstore.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp index 28c9d63..e5de5b4 100644 --- a/src/cstore/cstore.cpp +++ b/src/cstore/cstore.cpp @@ -626,7 +626,11 @@ Cstore::getCompletionEnv(const vector<string>& comps, string& env) if (def.def_enumeration) { cmd_str += (C_ENUM_SCRIPT_DIR + "/" + def.def_enumeration); } else { - cmd_str += def.def_allowed; + string astr = def.def_allowed; + shell_escape_squotes(astr); + cmd_str += "_cstore_internal_allowed () { eval '"; + cmd_str += astr; + cmd_str += "'; }; _cstore_internal_allowed"; } char *buf = (char *) malloc(MAX_CMD_OUTPUT_SIZE); |