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

feat: allow user-defined string formats (close #1227) #3230

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itchyny
Copy link
Contributor

@itchyny itchyny commented Jan 20, 2025

This commit extends the "def" syntax to define string formats.
By writing def @foo: ...;, @foo string format is available
in the following query. This idea is influenced by jaq. Close #1227.

This commit extends the "def" syntax to define string formats.
By writing `def @foo: ...;`, `@foo` string format is available
in the following query. This idea is influenced by jaq.
@itchyny itchyny force-pushed the user-defined-string-formats branch 2 times, most recently from 2148f37 to b86e734 Compare January 20, 2025 11:38
src/compile.c Show resolved Hide resolved
src/builtin.jq Outdated Show resolved Hide resolved
@itchyny itchyny force-pushed the user-defined-string-formats branch 2 times, most recently from 7e6217a to 562cc8a Compare January 22, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to define new @foo formats in jq, not just C
2 participants