Clean up path_get_cdpath and path_can_be_implicit_cd

This commit is contained in:
ridiculousfish
2018-09-16 04:05:17 -07:00
parent c1dd284b3e
commit 03b92ffe00
5 changed files with 34 additions and 42 deletions

View File

@@ -813,9 +813,9 @@ parse_execution_result_t parse_execution_context_t::populate_plain_process(
if (args_from_cmd_expansion.empty() && !args.try_get_child<g::argument, 0>() &&
!args.try_get_child<g::redirection, 0>()) {
// Ok, no arguments or redirections; check to see if the command is a directory.
wcstring implicit_cd_path;
use_implicit_cd =
path_can_be_implicit_cd(cmd, parser->vars().get_pwd_slash(), &implicit_cd_path);
path_as_implicit_cd(cmd, parser->vars().get_pwd_slash(), parser->vars())
.has_value();
}
}