curl/trurl

bug where --iterate causes --append to be duplicated for each iteration

jacobmealey opened this issue · 3 comments

The appended items are re-appended every iteration of a --iterate. I found this bug when I was working on #263, but i did more testing on 0.12.

two examples:

$ trurl example.com --append "path=folder" --iterate "scheme=http ssh ftp"
http://example.com/folder
ssh://example.com/folder/folder
ftp://example.com/folder/folder/folder
$ trurl example.com --append "query=foo=bar" --iterate "scheme=http ssh ftp"
http://example.com/?foo=bar
ssh://example.com/?foo=bar&foo=bar
ftp://example.com/?foo=bar&foo=bar&foo=bar

@jacobmealey do you want to work on fixing this or do you want me to have a look?

I'm working on getting the JSON input ready for a PR within the next couple of days, I can take a look once the PR is up and waiting for feedback.

however, if you (or someone else) wants to get this fixed up ASAP then by all means go ahead.

I'll grab it