use crate::error::ShellError; use super::{Builtin, BuiltinConfig}; pub struct Pwd; impl Builtin for Pwd { fn execute(&mut self, _: &mut BuiltinConfig, _: Vec) -> Result<(), ShellError> { match std::env::current_dir() { Ok(p) => println!("{}", p.display()), Err(e) => return Err(ShellError::ExecuteFailure(e.to_string())), } Ok(()) } }