lazycmd 0.1.1

Quck run command
Documentation
  • Coverage
  • 50%
    2 out of 4 items documented2 out of 2 items with examples
  • Size
  • Source code size: 6.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.14 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • wxnacy/lazycmd
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • wxnacy

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