Skip variable assignments in status current command

Fixes #6635
This commit is contained in:
Johannes Altmanninger
2020-02-24 00:16:12 +01:00
parent ebde9a6a44
commit aa0e16b1a5
5 changed files with 23 additions and 2 deletions

View File

@@ -2099,7 +2099,7 @@ void set_env_cmd_duration(struct timeval *after, struct timeval *before, env_sta
void reader_run_command(parser_t &parser, const wcstring &cmd) {
struct timeval time_before, time_after;
wcstring ft = tok_first(cmd);
wcstring ft = tok_command(cmd);
// For compatibility with fish 2.0's $_, now replaced with `status current-command`
if (!ft.empty()) parser.vars().set_one(L"_", ENV_GLOBAL, ft);