From 5b6e7bd818fc39b98267505cf5fc496454bb1989 Mon Sep 17 00:00:00 2001 From: fdai7381 Date: Tue, 24 Jan 2023 09:36:00 +0100 Subject: [PATCH] feat: add fetch builtin structure --- src/builtins/fetch.rs | 11 +++++++++++ src/builtins/mod.rs | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 src/builtins/fetch.rs diff --git a/src/builtins/fetch.rs b/src/builtins/fetch.rs new file mode 100644 index 0000000..a2ea1fd --- /dev/null +++ b/src/builtins/fetch.rs @@ -0,0 +1,11 @@ +use crate::error::ShellError; + +use super::{Builtin, BuiltinConfig}; + +pub struct Fetch; + +impl Builtin for Fetch { + fn execute(&mut self, _: &mut BuiltinConfig, _: Vec) -> Result<(), ShellError> { + Ok(()) + } +} diff --git a/src/builtins/mod.rs b/src/builtins/mod.rs index 8be215d..bad99e5 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 fetch; mod open; mod pwd; @@ -31,6 +32,7 @@ const BUILTINS: Lazy)>> = Lazy::new(|| { ("exit", Box::new(exit::Exit)), ("pwd", Box::new(pwd::Pwd)), ("open", Box::new(open::Open)), + ("fetch", Box::new(open::Open)), ] });