pub fn with_config(filename: &str) -> Self {
        let mut shell = Shell::new();
        //todo FIXME: variables not registering with shell
        for (var, value) in env::vars() {
            shell.add_variable(&var, Var::Str(value));
        }
        match execute_scriptfile(&mut shell, filename) {
            Ok(status) => {
                if status != 0 {
                    eprintln!("oyster: error occurred while running rcfile");
                }
            },
            Err(e) => {
                eprintln!("{}", e);
                eprintln!("oyster: cannot start shell with config");
            }
        }
        shell
    }
/// Loads in a config file and applies it to the shell.
/// Internally calls the run_script function in execute.
Loads in a config file and applies it to the shell.
Internally calls the run_script function in execute.
Loads in a config file and applies it to the shell . Internally calls the run_script function in execute .
pub fn with_config(filename: &str) -> Self {
        let mut shell = Shell::new();
        //todo FIXME: variables not registering with shell
        for (var, value) in env::vars() {
            shell.add_variable(&var, Var::Str(value));
        }
        match execute_scriptfile(&mut shell, filename) {
            Ok(status) => {
                if status != 0 {
                    eprintln!("oyster: error occurred while running rcfile");
                }
            },
            Err(e) => {
                eprintln!("{}", e);
                eprintln!("oyster: cannot start shell with config");
            }
        }
        shell
    }
pub fn with_config ( filename : & str ) -> Self { let mut shell = Shell :: new ( ) ; //todo FIXME: variables not registering with shell for ( var , value ) in env :: vars ( ) { shell . add_variable ( & var , Var :: Str ( value ) ) ; } match execute_scriptfile ( & mut shell , filename ) { Ok ( status ) => { if status != 0 { eprintln ! ( " " ) ; } } , Err ( e ) => { eprintln ! ( " " e ) ; eprintln ! ( " " ) ; } } shell }
Loads in a config file and applies it to the shell.
Loads in a config file and applies it to the shell .
filename
&str