Unexport CMD_DURATION

Valid uses of this environment variable don't really include passing
it to subsequent child processes.

I confirmed the fix with:

  function fish_prompt
      echo "cmd duration [$CMD_DURATION] "
  end

  cmd duration [0] sleep 2
  cmd duration [2002]
This commit is contained in:
Ben Hamilton 2015-01-16 11:54:31 -08:00 committed by Ben Hamilton
parent d4eded2376
commit b31305b9bd

View File

@ -2508,7 +2508,7 @@ void set_env_cmd_duration(struct timeval *after, struct timeval *before)
}
swprintf(buf, 16, L"%d", (secs * 1000) + (usecs / 1000));
env_set(ENV_CMD_DURATION, buf, ENV_EXPORT);
env_set(ENV_CMD_DURATION, buf, ENV_UNEXPORT);
}
void reader_run_command(parser_t &parser, const wcstring &cmd)