parse_script

Function parse_script 

Source
pub fn parse_script(input: &str) -> Result<Vec<Step>, Error>
Examples found in repository?
examples/tree_shell.rs (line 29)
19fn main() -> anyhow::Result<()> {
20    let temp = GuardedPath::tempdir()?;
21    let root = temp.as_guarded_path().clone();
22
23    println!("temp workspace: {}", temp.display());
24    println!("script:\n{SCRIPT}");
25    println!(
26        "You'll be dropped into 'demo' inside the temp workspace. Exit the shell to finish the example.\n"
27    );
28
29    let steps = parse_script(SCRIPT)?;
30    run_script(&root, &steps)
31}