Skip to content

Releases: sayanarijit/jf

v0.3.0

20 May 17:59
v0.3.0
d58a071
Compare
Choose a tag to compare

Added support for expandable named placeholders.

  • %(NAME)*s, %(NAME)*q expand named values as array items.
  • %(NAME)**s, %(NAME)**q expand named values as key value pairs.
  • Pass values for named array items using NAME=ITEM_N syntax.
  • Pass values for named key value pairs using NAME=KEY_N NAME=VALUE_N syntax.

Also, changed the syntax for optional placeholder from $?(...) to $(...)?.

v0.2.7

20 May 13:24
v0.2.7
862f352
Compare
Choose a tag to compare
- Added support for optional placeholders.
  ```bash
  jf "{str_or_bool: %?(str)q %?(bool)s, optional: %?(optional)q}" str=true
  # {"str_or_bool":"true","optional":null}
  ```

- Added support for placeholders with variable length values.
  ```bash
  jf [%*s] 1 2 3
  # [1,2,3]

  jf {%**q} one 1 two 2 three 3
  # {"one":"1","two":"2","three":"3"}
  ```

- Generate manpage.

v0.2.6

19 May 13:57
v0.2.6
f4864d3
Compare
Choose a tag to compare
Fixed another bug related to default values

To reproduce: `jf "%(foo=bar)q: %(foo)q"`
Should fail, but gave `{"bar":"bar"}`

v0.2.5

19 May 12:22
v0.2.5
7b3be6d
Compare
Choose a tag to compare
Fail for incomplete named placeholder

v0.2.4

19 May 11:58
d0f2646
Compare
Choose a tag to compare

Fixed a bug causing named placeholder values being overridden by default values.

v0.2.3

19 May 05:18
e831200
Compare
Choose a tag to compare

Added support for default values in named placeholders.

Example:

jf "{1: %(1=1)s, one: %(1=1)q, foo: %(foo=default)q, empty: %(bar=)q, esc: %(x=(\))q}" foo=bar

Output:

{"1":1,"one":"1","foo":"bar","empty":"","esc":"()"}

v0.2.2

14 May 08:09
88734f7
Compare
Choose a tag to compare
Use %v to print jf version

v0.2.1

14 May 07:52
910801c
Compare
Choose a tag to compare
  • Support named placeholders %(NAME)q and %(NAME)s.
  • Improve errors and instructions.
  • Optimize binary release.

v0.1.2

29 Mar 17:46
1d33b20
Compare
Choose a tag to compare
Bump for binary release

v0.1.1

29 Mar 17:29
e5e5f80
Compare
Choose a tag to compare

Initial release.