Skip to content

Comments

feat: cat -v, sort -m, brace/date/lexer fixes#234

Merged
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD
Feb 23, 2026
Merged

feat: cat -v, sort -m, brace/date/lexer fixes#234
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 23, 2026

Summary

  • cat -v/-n/-e/-t: Show non-printable characters (^M for CR, ^[ for ESC, etc.)
  • sort -m: Merge pre-sorted files via k-way merge
  • Brace space fix: echo { a,b,c } no longer triggers brace expansion or compound command parsing; { and } treated as literal words in argument position
  • Date format fix: date +"%Y-%m-%d %H:%M:%S" now works — strip surrounding quotes from format argument
  • Lexer word concatenation: Adjacent quoted segments are concatenated into single word tokens (e.g., +"%Y"+%Y as one token)
  • Array indices test: Rewrote to avoid spec format newline ambiguity

Test plan

  • Removed 5 skip markers (neg_array_indices_empty, neg_brace_no_expand_space, echo_escape_r, date_combined_format, sort_merge)
  • cargo test --all-features passes (69 pass, 49 ignored)
  • cargo test --test spec_tests passes (all 13 test groups including bash_comparison_tests)
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo fmt --check clean
  • Updated specs/009-implementation-status.md and specs/005-builtins.md

…oncat

- cat: add -v/-n/-e/-t flags for showing non-printable characters
- sort: add -m (merge pre-sorted files)
- parser: treat { and } as literal words in argument position
- lexer: concatenate adjacent quoted segments into single word token
  (fixes date +"%Y-%m-%d %H:%M:%S" being split on space)
- interpreter: skip brace expansion when content has leading/trailing space
- date: strip surrounding quotes from format argument

Removed 5 skip markers: neg_array_indices_empty, neg_brace_no_expand_space,
echo_escape_r, date_combined_format, sort_merge
@chaliy chaliy merged commit a2717bd into main Feb 23, 2026
16 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.

2 participants