From df2b8739b78a8c019b01ad234669b9c63b21a4f5 Mon Sep 17 00:00:00 2001 From: fdai7375 Date: Tue, 24 Jan 2023 09:32:35 +0100 Subject: [PATCH] feat: add basic open command structure --- src/builtins/mod.rs | 2 ++ src/builtins/open.rs | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/builtins/open.rs diff --git a/src/builtins/mod.rs b/src/builtins/mod.rs index eb050ad..8be215d 100644 --- a/src/builtins/mod.rs +++ b/src/builtins/mod.rs @@ -5,6 +5,7 @@ use once_cell::unsync::Lazy; mod cd; mod change_prompt; mod exit; +mod open; mod pwd; pub struct BuiltinConfig { @@ -29,6 +30,7 @@ const BUILTINS: Lazy)>> = Lazy::new(|| { ("change-prompt", Box::new(change_prompt::ChangePrompt)), ("exit", Box::new(exit::Exit)), ("pwd", Box::new(pwd::Pwd)), + ("open", Box::new(open::Open)), ] }); diff --git a/src/builtins/open.rs b/src/builtins/open.rs new file mode 100644 index 0000000..b3cfbf4 --- /dev/null +++ b/src/builtins/open.rs @@ -0,0 +1,11 @@ +use crate::error::ShellError; + +use super::{Builtin, BuiltinConfig}; + +pub struct Open; + +impl Builtin for Open { + fn execute(&mut self, _: &mut BuiltinConfig, _: Vec) -> Result<(), ShellError> { + Ok(()) + } +}