rust-shell-script / rust_cmd_lib

Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way
https://docs.rs/cmd_lib/
Apache License 2.0
1.05k stars 37 forks source link

Support expressions in string template parameters #60

Open coolbluewater opened 8 months ago

coolbluewater commented 8 months ago

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 as a template parameter. However, this reduces the effectiveness of the macro in making the code neater.

So, be great if this could be added. Thanks for the library.