diff --git a/Readme.org b/Readme.org index 3c7e118..63cb940 100644 --- a/Readme.org +++ b/Readme.org @@ -393,8 +393,8 @@ Errors during configuration are non-terminal. In such a case any defaults which - Variables and functions defined during configuration will carry over to the user/script interpreter, allowing the user to load any number of custom functions and variables. *** Configuration Values -- CFG_RELISH_POSIX (default 0): when on, enables POSIX style job control. -- CFG_RELISH_ENV (default 1): when on, interpreter's variable table and environment variable table are kept in sync. +- CFG_RELISH_POSIX (default false): when true, enables POSIX style job control. +- CFG_RELISH_ENV (default true): when true, interpreter's variable table and environment variable table are kept in sync. - CFG_RELISH_PROMPT (default (echo "λ ")): A *function* definition which is called in order to output the prompt for each loop of the REPL. This function will be reloaded each REPL loop and will be called by the interpreter with no arguments. diff --git a/src/config.rs b/src/config.rs index c361c59..16ccc9f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -29,19 +29,19 @@ fn prompt_default_callback(_: &Seg, _: &mut SymTable) -> Result { /* loads defaults, evaluates config script */ pub fn configure(filename: String, syms: &mut SymTable) -> Result<(), String> { - /*syms.insert( - "CFG_RELISH_POSIX".to_string(), - Symbol { - name: String::from("CFG_RELISH_POSIX"), - args: Args::None, - conditional_branches: false, - docs: "variable holding whether or not POSIX job control functions are to be loaded. + syms.insert( + "CFG_RELISH_POSIX".to_string(), + Symbol { + name: String::from("CFG_RELISH_POSIX"), + args: Args::None, + conditional_branches: false, + docs: "variable holding whether or not POSIX job control functions are to be loaded. checked at shell startup by configuration daemon. not used afterwards. - default value: not set".to_string(), - value: ValueType::VarForm(Box::new(Ctr::String("0".to_string()))), - }, - );*/ + default value: false".to_string(), + value: ValueType::VarForm(Box::new(Ctr::Bool(false))), + }, + ); syms.insert( "CFG_RELISH_ENV".to_string(), @@ -55,7 +55,7 @@ checked at shell startup by configuration daemon. not used afterwards. default value: 1 (set) ".to_string(), - value: ValueType::VarForm(Box::new(Ctr::String("1".to_string()))), + value: ValueType::VarForm(Box::new(Ctr::Bool(true))), }, ); diff --git a/src/stl.rs b/src/stl.rs index 5f5c988..8b71b1b 100644 --- a/src/stl.rs +++ b/src/stl.rs @@ -548,7 +548,7 @@ pub fn dynamic_stdlib(syms: &mut SymTable) -> Result<(), String> { .call_symbol(&"CFG_RELISH_ENV".to_string(), &Seg::new(), true) .unwrap_or_else(|_: String| Box::new(Ctr::None)) .to_string() - .ne(""); + .eq("true"); syms.insert( "def".to_string(),