Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trurl: add "strict:" as prefix to a get component #310

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented May 16, 2024

The strict prefix makes trurl immediately exit with an error code if such a get can't be done due to URL decoding problems. By default, such a problem will only make trurl skip that part and silently continue.

Use it like this: --get "{strict:query}"

I also made "url:" a valid prefix, and now we consider the single colon prefix to be a shortcut for url:. The concept of prefixes scale better when we use real words instead of single characters.

Ref: #305

The strict prefix makes trurl immediately exit with an error code if
such a get can't be done due to URL decoding problems. By default, such
a problem will only make trurl skip that part and silently continue.

Use it like this: --get "{strict:query}"

I also made "url:" a valid prefix, and now we consider the single colon
prefix to be a shortcut for url:. The concept of prefixes scale better
when we use real words instead of single characters.

Ref: #305
@bagder
Copy link
Member Author

bagder commented Jun 10, 2024

I created this PR because of an issue but I get no more feedback on it. I believe this can still be a decent improvement, that also is not in the way for users who don't want it. Unless someone objects properly I will proceed and merge soon.

@bagder bagder closed this in c51017c Jun 12, 2024
@bagder bagder deleted the bagder/strict-get branch June 12, 2024 07:45
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.

None yet

1 participant