Skip to content

feat: Added useful command decorators: @lines, @json, @jsonl, @yaml#6114

Merged
anki-code merged 6 commits into
xonsh:mainfrom
anki-code:add_command_decorators
Mar 5, 2026
Merged

feat: Added useful command decorators: @lines, @json, @jsonl, @yaml#6114
anki-code merged 6 commits into
xonsh:mainfrom
anki-code:add_command_decorators

Conversation

@anki-code

@anki-code anki-code commented Mar 4, 2026

Copy link
Copy Markdown
Member

Moved from xontrib-dalias to core:

$(@lines ls /)
# ['/bin', '/etc', '/home']

$(@json echo '{"a":1}')  # Try with `curl` ;)
# dict({"a":1})

$(@jsonl echo '{"a":1}\n{"b":2}')
# [{'a': 1}, {'b': 2}]

cfg = $(@yaml cat file.yaml)

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@anki-code anki-code marked this pull request as ready for review March 5, 2026 08:13
@anki-code anki-code changed the title feat: Added command decorators: @lines, @json, @jsonl, @yaml feat: Added useful command decorators: @lines, @json, @jsonl, @yaml Mar 5, 2026
@anki-code anki-code requested review from gforsyth and jnoortheen March 5, 2026 08:24
@anki-code

Copy link
Copy Markdown
Member Author

I'm going to do self-merge to see the changes in the docs and to have these small experimental additions in weekly fix release.

@anki-code anki-code merged commit 0f7124e into xonsh:main Mar 5, 2026
15 checks passed
anki-code pushed a commit that referenced this pull request Mar 5, 2026
🤖 I have created a release *beep* *boop*
---


## [0.22.5](0.22.4...0.22.5)
(2026-03-05)


### Features

* Added useful command decorators: `[@lines](https://github.com/lines)`,
`[@JSON](https://github.com/json)`,
`[@jsonl](https://github.com/jsonl)`, `[@yaml](https://github.com/yaml)`
([#6114](#6114))
([0f7124e](0f7124e))


### Bug Fixes

* **completion:** Fix os.path.commonprefix deprecation warning in
python3.15 ([#6102](#6102))
([2b5b2bb](2b5b2bb))
* Increase `@$()` stability and now it is also working in case of
`$THREAD_SUBPROCS=False`
([#6112](#6112))
([a3ac036](a3ac036))
* **predictor:** Fix predict_threadable to properly handle symlinks,
especially on NixOS
([#6115](#6115))
([bc01b04](bc01b04))
* **prompt:** Keep original key_bindings in prompt-toolkit shell to easy
add new key bindings during session
([#6093](#6093))
([e9b0aea](e9b0aea))
* replace 12 bare except clauses with except Exception
([#6110](#6110))
([54b311c](54b311c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: xonsh-credentials-bot[bot] <97968350+xonsh-credentials-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant