yom 0.1.7

A modern, easy to install competitor to the dash shell, built solely to execute files.
use std::io::{self, Write};

/// ██████╗ ███████╗ █████╗ ██████╗ 
/// ██╔══██╗██╔════╝██╔══██╗██╔══██╗
/// ██████╔╝█████╗  ███████║██║  ██║
/// ██╔══██╗██╔══╝  ██╔══██║██║  ██║
/// ██║  ██║███████╗██║  ██║██████╔╝
/// ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ 
/// Standard shell `read`
#[inline]
pub fn read<W: Write>(prompt: &str, out: &mut W) -> String {
    let _ = write!(out, "{prompt}");
    let _ = out.flush();

    let mut buffer = String::new();
    io::stdin()
        .read_line(&mut buffer)
        .expect("Failed to read line from stdin");
    buffer = buffer.strip_suffix("\n").unwrap_or(&buffer).to_string();
    buffer
}