rename relish to flesh

This commit is contained in:
Ava Apples Affine 2024-02-06 22:39:08 +00:00
parent 415b1181fa
commit 9b447eb5b7
58 changed files with 252 additions and 245 deletions

View file

@ -1,5 +1,5 @@
/* relish: versatile lisp shell
* Copyright (C) 2021 Aidan Hahn
/* Flesh: Flexible Shell
* Copyright (C) 2021 Ava Affine
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,16 +34,16 @@ pub mod math;
pub mod strings;
pub mod file;
pub const CONSOLE_XDIM_VNAME: &str = "_RELISH_WIDTH";
pub const CONSOLE_YDIM_VNAME: &str = "_RELISH_HEIGHT";
pub const POSIX_CFG_VNAME: &str = "CFG_RELISH_POSIX";
pub const MODENV_CFG_VNAME: &str = "CFG_RELISH_ENV";
pub const L_PROMPT_VNAME: &str = "CFG_RELISH_L_PROMPT";
pub const R_PROMPT_VNAME: &str = "CFG_RELISH_R_PROMPT";
pub const PROMPT_DELIM_VNAME: &str = "CFG_RELISH_PROMPT_DELIMITER";
pub const CFG_FILE_VNAME: &str = "RELISH_CFG_FILE";
pub const RELISH_DEFAULT_CONS_HEIGHT: i16 = 24;
pub const RELISH_DEFAULT_CONS_WIDTH: i16 = 80;
pub const CONSOLE_XDIM_VNAME: &str = "_FLESH_WIDTH";
pub const CONSOLE_YDIM_VNAME: &str = "_FLESH_HEIGHT";
pub const POSIX_CFG_VNAME: &str = "CFG_FLESH_POSIX";
pub const MODENV_CFG_VNAME: &str = "CFG_FLESH_ENV";
pub const L_PROMPT_VNAME: &str = "CFG_FLESH_L_PROMPT";
pub const R_PROMPT_VNAME: &str = "CFG_FLESH_R_PROMPT";
pub const PROMPT_DELIM_VNAME: &str = "CFG_FLESH_PROMPT_DELIMITER";
pub const CFG_FILE_VNAME: &str = "FLESH_CFG_FILE";
pub const FLESH_DEFAULT_CONS_HEIGHT: i16 = 24;
pub const FLESH_DEFAULT_CONS_WIDTH: i16 = 80;
fn l_prompt_default_callback(_: &Seg, _: &mut SymTable) -> Result<Ctr, Traceback> {
Ok(Ctr::String(">".to_string()))
@ -87,7 +87,7 @@ pub fn static_stdlib(syms: &mut SymTable) {
/// callbacks with configuration into a symtable
#[cfg(feature="posix")]
pub fn dynamic_stdlib(syms: &mut SymTable, shell: Option<Rc<RefCell<posix::ShellState>>>) {
// get CFG_RELISH_ENV from syms
// get CFG_FLESH_ENV from syms
let env_cfg_user_form = syms
.call_symbol(&MODENV_CFG_VNAME.to_string(), &Seg::new(), true)
.unwrap_or_else(|_: Traceback| Box::new(Ctr::None))
@ -207,7 +207,7 @@ default value: 1 (set)
&String::from(CONSOLE_XDIM_VNAME),
&String::from("Length of current console"),
&Seg::from_mono(Box::new(
Ctr::Integer(RELISH_DEFAULT_CONS_WIDTH.into())
Ctr::Integer(FLESH_DEFAULT_CONS_WIDTH.into())
)),
None,
)
@ -219,7 +219,7 @@ default value: 1 (set)
&String::from(CONSOLE_YDIM_VNAME),
&String::from("Height of current console"),
&Seg::from_mono(Box::new(
Ctr::Integer(RELISH_DEFAULT_CONS_HEIGHT.into())
Ctr::Integer(FLESH_DEFAULT_CONS_HEIGHT.into())
)),
None,
)