How to replace a query param by name? #260
-
Playing with trurl today and found a use case I couldn't solve. Say I have a URL like below and I want to replace the query param named "b" with the value "foo". Can trurl do that? By intuition I'd expect the same command, if exists, might also handle cases where the original URL includes multiple "b" params. ie...
I read the man page and below are some of my failed attempts:
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Currently, you need to first remove the existing 'b' and then add the new one:
|
Beta Was this translation helpful? Give feedback.
-
I opened a PR for this work that I think is in a good state to get merged in #261. @andrewrothman does the way I implemented it make sense with how you were thinking about it working? |
Beta Was this translation helpful? Give feedback.
Currently, you need to first remove the existing 'b' and then add the new one: