mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-27 12:11:15 -03:00
Instantize env_get_pwd_slash
This requires threading environment_t through many places, such as completions and history. We introduce null_environment_t for when the environment isn't important.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "future_feature_flags.h"
|
||||
#include "parse_constants.h"
|
||||
#include "parse_util.h"
|
||||
#include "parser.h"
|
||||
#include "tnode.h"
|
||||
#include "tokenizer.h"
|
||||
#include "util.h"
|
||||
@@ -1131,8 +1132,8 @@ static bool detect_errors_in_plain_statement(const wcstring &buff_src,
|
||||
if (maybe_t<wcstring> unexp_command = command_for_plain_statement(pst, buff_src)) {
|
||||
wcstring command;
|
||||
// Check that we can expand the command.
|
||||
if (expand_to_command_and_args(*unexp_command, &command, nullptr, parse_errors) ==
|
||||
EXPAND_ERROR) {
|
||||
if (expand_to_command_and_args(*unexp_command, null_environment_t{}, &command, nullptr,
|
||||
parse_errors) == EXPAND_ERROR) {
|
||||
errored = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user