Browse Source

feat: add fetch builtin structure

main
fdai7381 2 years ago
committed by fdai7451
parent
commit
5b6e7bd818
  1. 11
      src/builtins/fetch.rs
  2. 2
      src/builtins/mod.rs

11
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<String>) -> Result<(), ShellError> {
Ok(())
}
}

2
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<Vec<(&str, Box<dyn Builtin>)>> = Lazy::new(|| {
("exit", Box::new(exit::Exit)),
("pwd", Box::new(pwd::Pwd)),
("open", Box::new(open::Open)),
("fetch", Box::new(open::Open)),
]
});

Loading…
Cancel
Save