script icon indicating copy to clipboard operation
script copied to clipboard

Execv function

Open paulc opened this issue 1 year ago • 1 comments

Really enjoying using script however there have been a couple of use cases where I have wanted to avoid interpolating the Exec args into a single cmdLIne (and worrying about quoting - which can be complex if dealing with arbitrary input) - it would be useful to add an Execv(cmd string, args []string) method which passes the cmd and args separately as []string (which is what gets passed to exec.Command anyway so saves re-parsing the command line).

I've added an example implementation in https://github.com/bitfield/script/pull/189

paulc avatar Aug 25 '23 20:08 paulc

I'd like to work on this

ShatilKhan avatar Oct 08 '23 19:10 ShatilKhan