diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-25 15:39:08 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-25 15:39:08 -0500 |
commit | a875058500cc93f4d18bd5481d94987232bfbc2a (patch) | |
tree | 7ae8781f2f5aac00c7c087481e838967bb47eb07 | |
parent | 000d3619847673cb66c8dd84fce675386f894c75 (diff) | |
download | nbsh-a875058500cc93f4d18bd5481d94987232bfbc2a.tar.gz nbsh-a875058500cc93f4d18bd5481d94987232bfbc2a.zip |
rearrange some things
-rw-r--r-- | src/main.rs | 1 | ||||
-rw-r--r-- | src/state/history/builtins.rs (renamed from src/builtins.rs) | 0 | ||||
-rw-r--r-- | src/state/history/mod.rs (renamed from src/state/history.rs) | 6 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index c698b91..602eb8e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,6 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::type_complexity)] -mod builtins; mod env; mod event; mod format; diff --git a/src/builtins.rs b/src/state/history/builtins.rs index e8f87da..e8f87da 100644 --- a/src/builtins.rs +++ b/src/state/history/builtins.rs diff --git a/src/state/history.rs b/src/state/history/mod.rs index f147c37..acdbb44 100644 --- a/src/state/history.rs +++ b/src/state/history/mod.rs @@ -4,6 +4,8 @@ use pty_process::Command as _; use std::error::Error as _; use std::os::unix::process::ExitStatusExt as _; +mod builtins; + pub struct History { size: (u16, u16), entries: Vec<async_std::sync::Arc<async_std::sync::Mutex<Entry>>>, @@ -602,8 +604,8 @@ async fn run_exe( resize_r: async_std::channel::Receiver<(u16, u16)>, event_w: async_std::channel::Sender<crate::event::Event>, ) -> async_std::process::ExitStatus { - if crate::builtins::is(exe.exe()) { - let code: i32 = crate::builtins::run(exe.exe(), exe.args()).into(); + if builtins::is(exe.exe()) { + let code: i32 = builtins::run(exe.exe(), exe.args()).into(); return async_std::process::ExitStatus::from_raw(code << 8); } |