shelly-shell 0.5.4

A Rust based Unix style shell with a typed and structured language syntax.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

include!(concat!(env!("OUT_DIR"), "/bundled_std.rs"));

pub(crate) fn source(name: &str) -> Option<&'static str>
{
    MODULES.iter().find_map(|(module, source)| (*module == name).then_some(*source))
}

pub(super) fn has_children(name: &str) -> bool
{
    let prefix = format!("{}/", name);
    MODULES
        .iter()
        .any(|(module, _)| module.starts_with(&prefix))
}