lazycmd

Crates.iolazycmd
lib.rslazycmd
version0.1.1
created_at2025-01-13 13:09:11.999702+00
updated_at2025-02-15 03:43:43.45716+00
descriptionQuck run command
homepage
repositoryhttps://github.com/wxnacy/lazycmd
max_upload_size
id1514641
size6,226
wxnacy (wxnacy)

documentation

README

lazycmd

使用

output

快速执行命令

use lazycmd::output;
let out = output(["which", "curl"]).unwrap();
assert_eq!(out, "/usr/bin/curl");

spawn

执行命令并实时输出

use lazycmd::spawn;
spawn(["ls", "-l"]).unwrap();
total 32
-rw-r--r--@ 1 wxnacy  staff   372  1 13 20:29 Cargo.lock
-rw-r--r--@ 1 wxnacy  staff    96  1 13 20:58 Cargo.toml
-rw-r--r--@ 1 wxnacy  staff  1063  1 13 19:06 LICENSE
-rw-r--r--@ 1 wxnacy  staff   270  1 13 20:59 README.md
drwxr-xr-x@ 4 wxnacy  staff   128  1 13 20:41 src
drwxr-xr-x@ 5 wxnacy  staff   160  1 13 19:06 target

Commit count: 5

cargo fmt