John Arundel

Results 181 comments of John Arundel

Yes, CSV is a good example. If we wanted to parse CSV data with the minimum of user paperwork, we could write something like: ```go script.File("data.csv").CSV().Column(1).Stdout() ``` Specifying a cutset...

I think [`os.Chdir`](https://pkg.go.dev/os#Chdir) should do this, shouldn't it?

Yes, I see your point. The `exec.Cmd` does have a `Dir` field to control this, but currently `script` doesn't provide any way to set it for the command executed by...

Functional options is definitely a possibility here, though it ends up being a little awkward because the option names need to be prefixed with the package name. A more realistic...

The flow-breaking is still there, even if you spread it across multiple lines. And there's a question about what happens if you pipe the output of *this* `Exec` into some...

Or even just: ```go script.NewPipe().At("/home/me")... ```

It's a good suggestion, but I don't think I've seen enough widespread support to convince me that the _lack_ of such a mechanism is a serious problem for a large...

By all means make a specific proposal! What about this, for example: ```go script.At("/home/john").Exec("ls") ```

Let's see if we can come up with one or two more realistic examples of programs using `At`, to get a better idea of whether this API works.

What would really help us here is a program that: 1. Solves some real user problem (so that it's worth writing the program at all) 2. Uses the proposed API...