bigtext 0.4.1

Fast text editor for huge files (1-50+ GB): opens instantly, never freezes, streaming search/replace and atomic save
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! `bigtext-cli`: BigText's tools for scripts, without a window (filter, levels, count, split,
//! stats, merge, convert). A console program, so scripts get its output and exit code on
//! every platform; `bigtext --filter …` runs the same commands.

fn main() {
    let args: Vec<String> = std::env::args().skip(1).collect();
    let code = if args.is_empty() || matches!(args[0].as_str(), "-h" | "--help") {
        print!("{}", bigtext::headless::USAGE);
        if args.is_empty() { 2 } else { 0 }
    } else {
        bigtext::headless::run(&args, &mut std::io::stdout().lock(), &mut std::io::stderr().lock())
    };
    std::process::exit(code);
}