From a6a18794812091a1faf03a90eb7a90229a3db098 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 24 Oct 2021 14:17:33 -0700 Subject: [PATCH] Remove reader_get_history It was unused. --- src/expand.cpp | 2 -- src/reader.cpp | 6 ------ 2 files changed, 8 deletions(-) diff --git a/src/expand.cpp b/src/expand.cpp index 8d3366a27..0666ad907 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -358,8 +358,6 @@ static expand_result_t expand_variables(wcstring instr, completion_receiver_t *o std::shared_ptr history{}; maybe_t var{}; if (var_name == L"history") { - // Note reader_get_history may return null, if we are running non-interactively (e.g. from - // web_config). if (is_main_thread()) { history = history_t::with_name(history_session_id(vars)); } diff --git a/src/reader.cpp b/src/reader.cpp index 9656515ae..bc0176bae 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -2872,12 +2872,6 @@ static bool event_is_normal_char(const char_event_t &evt) { return !fish_reserved_codepoint(c) && c > 31 && c != 127; } -std::shared_ptr reader_get_history() { - ASSERT_IS_MAIN_THREAD(); - reader_data_t *data = current_data_or_null(); - return data ? data->history : nullptr; -} - /// Run a sequence of commands from an input binding. void reader_data_t::run_input_command_scripts(const wcstring_list_t &cmds) { auto last_statuses = parser().get_last_statuses();