rust_cmd_lib
rust_cmd_lib copied to clipboard
Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way
OS: Windows (don't know if it's an issue on Linux) Let's say my application accepts arbitrary commands dynamically via user input I have the next: ```rs #[cfg(target_os = "windows")] let...
specially when commands fail, it would be good if it was possible to access the Cmd or the arguments from the error result. For example, when running `something arg1 arg2`...
I'm compiling my exe with `#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]` an issue I've noticed that whenever I trigger a new command it opens up a new window. I've used Process before...
In a shell script, a semi-colon indicates that the next command should run regardless of if the preceding command succeeds. However, in run_cmd!, a semi-colon behaves like `&&` instead. Ideally,...
Hello, love the library. I am looking to see if there are examples available for testing / mocking the outputs. I have tried a number of methodologies to mock the...
I think I just got put on a list somewhere. You can do it with the PIDs but it would be cool if it had a convenience method.
This ensures the license text is included in the package crate for macros when it's uploaded to crates.io.
It would be handy to be able to use `Command::exec()` with a convenient macro. I commonly use this when I need to transform the current process entirely into another process...
I've tried `${variable_name}` inside `run_cmd!`, that works fine. Unfortunately `${foo.bar()}` produces an error. It's easy to work around this by setting a variable to the expression and using the variable...
I am not very familiar with Rust. Though cmd_lib can pass a vector to `run_cmd!`, the vector item must still be the same type, which is inconvenient. For example, trying...