change env_var_t to a vector of strings

Internally fish should store vars as a vector of elements. The current
flat string representation is a holdover from when the code was written
in C.

Fixes #4200
This commit is contained in:
Kurtis Rader
2017-08-05 15:08:39 -07:00
parent 6e02ec83d1
commit f872f25f5b
30 changed files with 503 additions and 543 deletions

View File

@@ -473,7 +473,9 @@ parse_execution_result_t parse_execution_context_t::run_for_statement(
}
const wcstring &val = argument_sequence.at(i);
env_set(for_var_name, ENV_LOCAL, val.c_str());
// This is wrong. It should or in ENV_USER and test if ENV_PERM is returned.
// TODO: Fix this so it correctly handles read-only vars.
env_set_one(for_var_name, ENV_LOCAL, val);
fb->loop_status = LOOP_NORMAL;
this->run_job_list(block_contents, fb);