Skip to content

fix: prefix only first command in pipelines (fixes jq expressions)#11

Merged
VincentHardouin merged 1 commit into
mainfrom
fix/pipeline-first-command-only
Apr 10, 2026
Merged

fix: prefix only first command in pipelines (fixes jq expressions)#11
VincentHardouin merged 1 commit into
mainfrom
fix/pipeline-first-command-only

Conversation

@VincentHardouin
Copy link
Copy Markdown
Owner

Summary

  • Prefix snip only on the first command in pipelines, not on subsequent commands
  • Preserve pipes inside quoted strings (single and double quotes) to fix jq expressions
  • Ignore || operators when looking for pipe characters

Fixes #8

Test plan

  • Added tests for jq expressions with pipes
  • Added tests for pipes inside single and double quotes
  • Updated existing pipe test to expect only first command prefixed
  • All 26 tests passing

@VincentHardouin VincentHardouin force-pushed the fix/pipeline-first-command-only branch from 656a123 to 0a9dae1 Compare April 10, 2026 17:31
@VincentHardouin VincentHardouin force-pushed the fix/pipeline-first-command-only branch from 0a9dae1 to 254ad4c Compare April 10, 2026 17:34
@VincentHardouin VincentHardouin merged commit da1e531 into main Apr 10, 2026
2 checks passed
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.

Bug: pipe operator splitting breaks jq expressions containing pipes

1 participant