pub fn list(hc_dir: PathBuf, verbose: usize) -> anyhow::Result<()> {
    let out = load(hc_dir)?.into_iter().enumerate().try_fold(
        "\nSetups contained in `.hc`\n".to_string(),
        |out, (i, path)| {
            let r = match verbose {
                0 => format!("{}{}: {}\n", out, i, path.display()),
                _ => {
                    let config = config::read_config(path.clone())?;
                    format!(
                        "{}{}: {}\nConductor Config:\n{:?}\n",
                        out,
                        i,
                        path.display(),
                        config
                    )
                }
            };
            anyhow::Result::<_, anyhow::Error>::Ok(r)
        },
    )?;
    msg!("{}", out);
    Ok(())
}
/// Print out the setups contained in the `.hc` file.
Print out the setups contained in the `.hc` file.
Print out the setups contained in the ` . hc ` file .
pub fn list(hc_dir: PathBuf, verbose: usize) -> anyhow::Result<()> {
    let out = load(hc_dir)?.into_iter().enumerate().try_fold(
        "\nSetups contained in `.hc`\n".to_string(),
        |out, (i, path)| {
            let r = match verbose {
                0 => format!("{}{}: {}\n", out, i, path.display()),
                _ => {
                    let config = config::read_config(path.clone())?;
                    format!(
                        "{}{}: {}\nConductor Config:\n{:?}\n",
                        out,
                        i,
                        path.display(),
                        config
                    )
                }
            };
            anyhow::Result::<_, anyhow::Error>::Ok(r)
        },
    )?;
    msg!("{}", out);
    Ok(())
}
pub fn list ( hc_dir : PathBuf , verbose : usize ) -> anyhow :: Result < ( ) > { let out = load ( hc_dir ) ? . into_iter ( ) . enumerate ( ) . try_fold ( " \n \n " . to_string ( ) , | out , ( i , path ) | { let r = match verbose { 0 => format ! ( " \n " out i path display ( ) ) , _ => { let config = config :: read_config ( path . clone ( ) ) ? ; format ! ( " \n \n \n " out i path display ( ) config ) } } ; anyhow :: Result :: < _ , anyhow :: Error > :: Ok ( r ) } , ) ? ; msg ! ( " " out ) ; Ok ( ( ) ) }
Print out the setups contained in the `.hc` file.
Print out the setups contained in the ` . hc ` file .
hc_dir
PathBuf
verbose
usize
hc_dir
PathBuf
verbose
usize