pub trait ShellEnvironment {
// Required methods
fn get_var(&self, name: &str) -> Option<&str>;
fn set_var(&mut self, name: &str, value: &str);
fn export_var(&mut self, name: &str);
fn unset_var(&mut self, name: &str);
fn exit_status(&self) -> i32;
fn set_exit_status(&mut self, status: i32);
fn chdir(&mut self, path: &str) -> Result<(), String>;
fn home_dir(&self) -> Option<&str>;
}Expand description
Trait that builtins use to interact with the shell environment.
Defined here (rather than in frost-exec) so builtins have no
dependency on the execution engine.