yq/cmd
Copilot 44c55c8a54
Add system(command; args) operator (disabled by default) (#2640)
* Initial plan

* Add system(command; args) operator with --enable-system-operator flag

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/8a11e9a0-10d2-4f2a-ae29-4e9d0bfc266f

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>

* Update pkg/yqlib/operator_system.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Evaluate system command/args per matched node using SingleReadonlyChildContext

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/dca841eb-3f63-4f23-adeb-556431560420

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>

* Add yqFlags to expressionScenario for doc command snippets; fix system op docs

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/3f8a5375-25fd-4428-a8e6-b630194c36b2

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>

* Update pkg/yqlib/doc/operators/headers/system-operators.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/yqlib/doc/operators/system-operators.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Validate command node type and handle multiple results with debug log

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/928aabc5-ad71-41d8-94ab-403942e3f92d

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove deprecated --enable-system-operator alias; use --security-enable-system-operator consistently

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/286b95e9-b6d7-4ab8-b401-2d7a03853922

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Address deep review feedback: error on disabled, strict arg/cmd validation, debug logs, docs

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/fbfba2db-60ea-4c20-a4c2-0fd396b80c81

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>
Co-authored-by: Mike Farah <mikefarah@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-10 20:06:46 +10:00
..
completion.go Fix: shell-completion (#2006) 2024-04-22 14:15:36 +10:00
constant.go Added "debug-node-info" flag for inspecting yq AST 2025-07-15 21:35:54 +10:00
evaluate_all_command_test.go Fixing tests with latest linting rules 2026-03-26 09:29:51 +11:00
evaluate_all_command.go fix: preserve original filename when using --front-matter (#2613) 2026-03-26 09:06:20 +11:00
evaluate_sequence_command_test.go Fixing tests with latest linting rules 2026-03-26 09:29:51 +11:00
evaluate_sequence_command.go fix: preserve original filename when using --front-matter (#2613) 2026-03-26 09:06:20 +11:00
root_test.go Fixing tests with latest linting rules 2026-03-26 09:29:51 +11:00
root.go Add system(command; args) operator (disabled by default) (#2640) 2026-04-10 20:06:46 +10:00
unwrap_flag.go Spellig with cspell 2023-09-19 10:43:11 +10:00
utils_test.go Bumping golint 2026-03-21 09:25:31 +11:00
utils.go Replace gopkg.in/op/go-logging.v1 with log/slog (#2635) 2026-03-26 20:41:54 +11:00
version_test.go More tests 2026-02-01 10:27:18 +11:00
version.go Bumping version 2026-03-26 10:03:01 +11:00