improvements to configuration system

This commit is contained in:
Ava Apples Affine 2023-03-18 23:00:55 -07:00
parent bfd1058ad7
commit 8a91560921
Signed by: affine
GPG key ID: 3A4645B8CF806069
3 changed files with 15 additions and 15 deletions

View file

@ -29,19 +29,19 @@ fn prompt_default_callback(_: &Seg, _: &mut SymTable) -> Result<Ctr, String> {
/* 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))),
},
);

View file

@ -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(),