From f9c5cb86304748baf0da99126bf75c5a3cd3e773 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 5 Jan 2022 07:30:34 -0500 Subject: and more simplification --- src/shell/history/mod.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/shell/history/mod.rs') diff --git a/src/shell/history/mod.rs b/src/shell/history/mod.rs index 76e7d3b..d8adb49 100644 --- a/src/shell/history/mod.rs +++ b/src/shell/history/mod.rs @@ -1,10 +1,5 @@ use crate::shell::prelude::*; -use async_std::io::WriteExt as _; -use futures_lite::future::FutureExt as _; -use std::os::unix::io::{FromRawFd as _, IntoRawFd as _}; -use std::os::unix::process::ExitStatusExt as _; - mod entry; pub use entry::Entry; mod pty; @@ -93,7 +88,7 @@ impl History { pub async fn run( &mut self, ast: crate::parse::Commands, - env: &crate::Env, + env: &Env, event_w: async_std::channel::Sender, ) -> anyhow::Result { let (input_w, input_r) = async_std::channel::unbounded(); @@ -124,7 +119,7 @@ impl History { pub async fn parse_error( &mut self, e: crate::parse::Error, - env: &crate::Env, + env: &Env, event_w: async_std::channel::Sender, ) -> anyhow::Result { // XXX would be great to not have to do this @@ -274,7 +269,7 @@ impl std::iter::DoubleEndedIterator for VisibleEntries { fn run_commands( ast: crate::parse::Commands, entry: async_std::sync::Arc>, - mut env: crate::Env, + mut env: Env, input_r: async_std::channel::Receiver>, resize_r: async_std::channel::Receiver<(u16, u16)>, event_w: async_std::channel::Sender, @@ -330,7 +325,7 @@ fn run_commands( async fn run_pipeline( pty: &pty::Pty, - env: &mut crate::Env, + env: &mut Env, event_w: async_std::channel::Sender, ) -> anyhow::Result<(async_std::process::ExitStatus, bool)> { let mut cmd = pty_process::Command::new(std::env::current_exe().unwrap()); -- cgit v1.2.3-54-g00ecf