Skip to content

Overriding ToString to output exact process and arguments on Command #19

Closed
@Stephanvs

Description

@Stephanvs

Hi, first of thanks for the great library, already saved me a lot of time for automating lots of small tasks.

I'm however finding for debugging purposes wanting to output the started process including the given arguments when I do a Command.Run()..

I could obviously do it myself, but I think it would make sense if the ToString on Command is overridden to return the actual command that'll be executed. What do you think about this idea, or is there already another way to achieve the same result?

So if I do;

var cmd = Command.Run("path_to_grep", "some REGEX");
cmd.ToString(); // --> This would equal "path_to_grep some REGEX"

It should obviously use the CommandLineSyntax if one is configured in the options.

Thanks again.
Stephan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions