From b7cc7db93c029940fa5c0ada9064c933c1bbc81b Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 20 Feb 2024 16:55:32 +0100 Subject: [PATCH] fish_key_reader: Remove unnecessary parser I have no idea what this would be used for, it's instantiated, we set is_interactive, and then we never use it. --- src/bin/fish_key_reader.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/bin/fish_key_reader.rs b/src/bin/fish_key_reader.rs index 9369b591d..7022b461e 100644 --- a/src/bin/fish_key_reader.rs +++ b/src/bin/fish_key_reader.rs @@ -18,14 +18,13 @@ use libc::{STDIN_FILENO, TCSANOW, VEOF, VINTR}; use fish::future::IsSomeAnd; use fish::{ builtins::shared::BUILTIN_ERR_UNKNOWN, - common::{scoped_push_replacer, shell_modes, str2wcstring, PROGRAM_NAME}, + common::{shell_modes, str2wcstring, PROGRAM_NAME}, env::env_init, eprintf, fallback::fish_wcwidth, fprintf, input::input_terminfo_get_name, input_common::{CharEvent, InputEventQueue, InputEventQueuer}, - parser::Parser, print_help::print_help, printf, proc::set_interactive_session, @@ -281,12 +280,6 @@ fn setup_and_process_keys(continuous_mode: bool, verbose: bool) -> ! { env_init(None, true, false); reader_init(); - let parser = Parser::principal_parser(); - let _interactive = scoped_push_replacer( - |new_value| std::mem::replace(&mut parser.libdata_mut().pods.is_interactive, new_value), - true, - ); - signal_set_handlers(true); // We need to set the shell-modes for ICRNL, // in fish-proper this is done once a command is run.