Revert "Non-exported vars: rename SHLVL to shlvl"

Duh, of course it is exported.

This reverts commit 5fc17dcc82.
This commit is contained in:
Aaron Gyes
2017-10-15 04:37:34 -07:00
parent 5fc17dcc82
commit a9283803d4
5 changed files with 24 additions and 24 deletions

View File

@@ -375,8 +375,8 @@ void internal_exec(job_t *j, const io_chain_t &&all_ios) {
// commands in the pipeline will apply to exec. However, using exec in a pipeline doesn't
// really make sense, so I'm not trying to fix it here.
if (!setup_child_process(0, all_ios)) {
// Decrement shlvl as we're removing ourselves from the shell "stack".
auto shlvl_var = env_get(L"shlvl", ENV_GLOBAL | ENV_EXPORT);
// Decrement SHLVL as we're removing ourselves from the shell "stack".
auto shlvl_var = env_get(L"SHLVL", ENV_GLOBAL | ENV_EXPORT);
wcstring shlvl_str = L"0";
if (shlvl_var) {
long shlvl = fish_wcstol(shlvl_var->as_string().c_str());
@@ -384,7 +384,7 @@ void internal_exec(job_t *j, const io_chain_t &&all_ios) {
shlvl_str = to_string<long>(shlvl - 1);
}
}
env_set_one(L"shlvl", ENV_GLOBAL | ENV_EXPORT, shlvl_str);
env_set_one(L"SHLVL", ENV_GLOBAL | ENV_EXPORT, shlvl_str);
// launch_process _never_ returns.
launch_process_nofork(j->processes.front().get());