scriptkit

Crates.ioscriptkit
lib.rsscriptkit
version1.0.1
sourcesrc
created_at2022-12-19 21:59:07.161204
updated_at2023-01-06 23:52:55.929141
descriptionA simple scripting Tool Kit for Rust
homepage
repository
max_upload_size
id741717
size4,904
Chris Paige (chrispaig3)

documentation

README

ScriptKit

A simple toolkit for shell scripting in Rust!

Basic Usage

use scriptkit::shell::{Cmd, Arg, shell_tools::null_sh};
#[allow(unused_imports)] 
use scriptkit::sys::{OS, os_eye::open};

fn print_host() {
    println!("Executed On: {:?}", open().name);
}

fn main() {
    // Construct your command!
    let cmd = Cmd::new("echo");
    
    // Construct your argument!
    let arg = Arg::new("Hello, World!");
    
    // Execute the command!
    null_sh(cmd, arg).expect("Failed to run command");
    
    print_host();
}
Commit count: 0

cargo fmt