mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Adopt the new AST in bash history import
This switches bash history importing from parsing with parse_tree to the new ast.
This commit is contained in:
parent
46c4ec8d68
commit
358d7072a2
1 changed files with 2 additions and 2 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <type_traits>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "ast.h"
|
||||
#include "common.h"
|
||||
#include "env.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
|
@ -1096,8 +1097,7 @@ void history_impl_t::populate_from_config_path() {
|
|||
static bool should_import_bash_history_line(const wcstring &line) {
|
||||
if (line.empty()) return false;
|
||||
|
||||
parse_node_tree_t parse_tree;
|
||||
if (!parse_tree_from_string(line, parse_flag_none, &parse_tree, nullptr)) return false;
|
||||
if (ast::ast_t::parse(line).errored()) return false;
|
||||
|
||||
// In doing this test do not allow incomplete strings. Hence the "false" argument.
|
||||
parse_error_list_t errors;
|
||||
|
|
Loading…
Reference in a new issue