Closed jacobmealey closed 6 months ago
Instead of adding a replacelist
and all this extra code‚ can't this be implemented as just calls to trimadd(); appendadd()
in replaceadd()
?
I was worried about preserving the order of the other items in the list query list, if we did it with trimadd and appendadd it would always put it at the end of the query list, right? If that's not an issue then I can rework this pr this evening to do it that way because it will simplify things.
Thanks for this work @jacobmealey.
These options are rather specific for query strings, as they are the only components in a URL that is actually a list of value pairs and therefore the only component where replace makes sense as everywhere else you can just set the component to replace it.
Based on this, I don't foresee that these options can be made to support other components than the query. If nobody else can come up with a scenario where that could happen, maybe we could streamline these a little more? For example maybe --replace foo=bar
directly instead of --replace query=foo=bar
?
@bagder that makes sense, I will get started on that this weekend. It should be pretty quick so hopefully I'll have a PR by Sunday.
Thanks!
implement --replace as seen in #260 discussion