Shells
Sugar-coating for invoking shell commands directly from Rust.
Install / Use
/learn @Proksima/ShellsREADME
Shells for Rust
Wrapper around std::process::Command which make the use of Rust for shell scripting more appealing.
Documentation
http://proksima.github.io/shells-doc/shells/index.html
Simple example
#[macro_use]
extern crate shells;
fn main() {
let (code, stdout, stderr) = sh!("echo '{} + {}' | bc", 1, 3);
assert_eq!(code, 0);
assert_eq!(&stdout[..], "4\n");
assert_eq!(&stderr[..], "");
}
A mnemotechnic to remember the ordering of the elements in the resulting tuple is the positions of stdout and stderr, they correspond to the standard streams numbers: 1 and 2 respectively.
If I a missing your favorite (at least partially) POSIX-compliant shell, submit a pull request!
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
