ed(1) in Rust

by beefhashon 10/24/20, 12:59 PMwith 1 comments
by ekiddon 10/24/20, 1:16 PM

This repo is just an obvious and trivial joke about ed, which notoriously uses "?" for all error messages:

    let mut x = String::new();
    loop {
        io::stdin().read_line(&mut x)
            .expect("?");
        println!("?");
    }
It would actually be fun to implement ed in Rust—it's the best of of the popular low-bandwidth "line editors", with some nice support for regex-based search and replace. It's one of the few editors that could be a used with a slow line-by-line printer as the only output device.