I'd like to run a command / function where what is run is composed of some dynamic options passed in by the user. So I have a command and depending on whether or not the user passes some argument to my rust program, I'd like to run (via run_fun!) another external program either including or not this option. There are several such options, so enumerating all possibilities grows combinatorially.
I tried building a single command string, but realized the run_fun! macro won't tokenize that on spaces the way the subprocess needs. What is the recommended way to achieve this functionality in cmd_lib?
I'd like to run a command / function where what is run is composed of some dynamic options passed in by the user. So I have a command and depending on whether or not the user passes some argument to my rust program, I'd like to run (via
run_fun!
) another external program either including or not this option. There are several such options, so enumerating all possibilities grows combinatorially.I tried building a single command string, but realized the
run_fun!
macro won't tokenize that on spaces the way the subprocess needs. What is the recommended way to achieve this functionality incmd_lib
?Thanks! Rob