Skip to content

trurl: add --trim#60

Merged
bagder merged 1 commit intomasterfrom
bagder/trim
Apr 4, 2023
Merged

trurl: add --trim#60
bagder merged 1 commit intomasterfrom
bagder/trim

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Apr 4, 2023

--trim can remove (parts of) components. Starting out with query support for removing specific "tuples".

Man page and README updates. Added test cases.

Fixes #50

--trim can remove (parts of) components. Starting out with query support for
removing specific "tuples".

Man page and README updates. Added test cases.

Fixes #50
@bagder bagder merged commit 5ed5181 into master Apr 4, 2023
@bagder bagder deleted the bagder/trim branch April 4, 2023 09:27
@ijoseph
Copy link
Copy Markdown

ijoseph commented Apr 4, 2023

This is so powerful! We can now do something like:

    trimmed=$(trurl "$url" --trim query='utm_*')
    trimmed=$(trurl "$trimmed" --trim query='fbclid*')
    trimmed=$(trurl "$trimmed" --trim query='notif*')
    trimmed=$(trurl "$trimmed" --trim query='ref*') 

It's a bit whack-a-mole, but like with AdBlock, ad campaign tracker prefixes could be crowdsourced. Love it.

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Apr 4, 2023

You can also do any amount of --trim actions on the same command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

suggestion: strip parameters

2 participants