yom 0.1.7

A modern, easy to install competitor to the dash shell, built solely to execute files.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::io::Write;

/// ██████╗ ██╗    ██╗██████╗ 
/// ██╔══██╗██║    ██║██╔══██╗
/// ██████╔╝██║ █╗ ██║██║  ██║
/// ██╔═══╝ ██║███╗██║██║  ██║
/// ██║     ╚███╔███╔╝██████╔╝
/// ╚═╝      ╚══╝╚══╝ ╚═════╝ 
/// Standard shell `pwd`
#[inline]
pub fn pwd<W: Write>(out: &mut W) -> std::io::Result<()> {
    let pwd = std::env::current_dir()?;
    let _ = write!(out, "{}\n", pwd.display())
        .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?;
    Ok(())
}