Make eval a decorator

`eval` has always been implemented as a function, which was always a bit
of a hack that caused some issues such as triggering the creation of a
new scope. This turns `eval` into a decorator.

The scoping issues with eval prevented it from being usable to actually
implement other shell components in fish script, such as the problems
described in #4442, which should now no longer be the case.

Closes #4443.
This commit is contained in:
Mahmoud Al-Qudsi
2019-04-10 22:38:19 -05:00
parent 0bda853dc7
commit 2fe2169065
6 changed files with 64 additions and 90 deletions

View File

@@ -1469,8 +1469,8 @@ void completer_t::perform() {
use_command = true;
use_function = true;
use_builtin = true;
use_implicit_cd = false;
use_abbr = false;
use_implicit_cd = true;
use_abbr = true;
break;
}
}