Skip to content

feat: add custom delimiter support (-d/--delimiter, --tsv)#30

Merged
vmvarela merged 2 commits intomasterfrom
feat/issue-9-custom-delimiter
Mar 3, 2026
Merged

feat: add custom delimiter support (-d/--delimiter, --tsv)#30
vmvarela merged 2 commits intomasterfrom
feat/issue-9-custom-delimiter

Conversation

@vmvarela
Copy link
Owner

@vmvarela vmvarela commented Mar 3, 2026

Summary

Adds custom input field delimiter support, allowing users to parse TSV, PSV, and other delimited formats beyond standard CSV.

Changes

  • CLI flags: -d / --delimiter <char> accepts a single character; --tsv is a convenience alias for --delimiter '\t'
  • CSV parser (csv.zig): CsvReader now accepts a runtime delimiter instead of hardcoded ,; new csvReaderWithDelimiter() constructor; existing csvReader() defaults to ,
  • Help text (main.zig): updated --help output with new flags and examples
  • README: documented delimiter flags, TSV alias, and usage examples
  • Man page (docs/sql-pipe.1.scd): added -d/--delimiter and --tsv to OPTIONS, DESCRIPTION, and EXAMPLES

Tests

  • 2 new unit tests in csv.zig: custom pipe delimiter, custom tab delimiter
  • All 12 existing + new tests pass
  • Smoke-tested with pipe-separated and tab-separated input via CLI

Acceptance Criteria (from #9)

  • -d / --delimiter flag accepts a single character
  • Tab delimiter via --delimiter $'\t' or --tsv
  • Defaults to , (standard CSV) if not specified
  • Documented in --help, README, and man page

Closes #9

vmvarela added 2 commits March 3, 2026 18:47
- Add -d/--delimiter flag accepting a single character
- Add --tsv alias for --delimiter '\t'
- Default remains ',' (standard CSV) when not specified
- Update --help output, README, and man page

Closes #9
@github-actions github-actions bot added type:feature New functionality type:docs Documentation only labels Mar 3, 2026
@vmvarela vmvarela merged commit 4c9b3a1 into master Mar 3, 2026
6 checks passed
@vmvarela vmvarela deleted the feat/issue-9-custom-delimiter branch March 3, 2026 18:15
@vmvarela vmvarela mentioned this pull request Mar 3, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:docs Documentation only type:feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom delimiter support (--delimiter / --tsv)

1 participant