5 个版本
| 0.1.5 | 2024年1月29日 |
|---|---|
| 0.1.4 | 2024年1月29日 |
#66 in #executable
用于 enwiro
5KB
57 行
path_lookup-rs
在 Rust 中查找 $PATH 中的所有可执行命令。
安装
将 path_lookup 添加到您的 Cargo.toml
cargo add path_lookup
用法
iterate_executables() 返回一个 Iterator<Item = String>
for command in iterate_executables() {
// ... etc ...
}
get_executables() 返回一个 HashSet<String>
let all_commands: HashSet<String> = get_executables();
依赖项
~180KB