Closed 8 closed 3 years ago
Hi.
The With...
methods were added as a more convenient way to configure optional parameters. The target file path is the only parameter which is not optional, so there is no With...
method for it. That's pretty much the only reason.
I could see the benefit of adding it for the use case you explained, but wouldn't it be easier to do something like this?
public Command GetMyCommand(string shell, string command) =>
Cli.Wrap(shell).WithArguments(new[]{"-c", command});
Hi,
I was looking for a
WithTargetFilePath()
method, but I didn't find any.e.g. You have a command
Command
and now you want to wrap in another shell, e.g. run it usingwsl
. On the shell, I just need to prependwsl
before the command The same goes for different versions of executables that differ only by name.Did I miss anything / Is there another some design reason why this is not supported?
Thank you!
Take care, Martin