Skip to content

feat(builtins): add clear, fold, expand/unexpand, envsubst commands#582

Merged
chaliy merged 1 commit intomainfrom
claude/process-issues-systematically-AEJJh
Mar 14, 2026
Merged

feat(builtins): add clear, fold, expand/unexpand, envsubst commands#582
chaliy merged 1 commit intomainfrom
claude/process-issues-systematically-AEJJh

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 14, 2026

Summary

  • clear: Output ANSI escape sequences to clear terminal screen
  • fold: Wrap lines at specified width (-w, -s for word boundary)
  • expand/unexpand: Convert between tabs and spaces (-t N for custom tab stops)
  • envsubst: Substitute $VAR/${VAR} references from environment variables (-v to list vars, SHELL-FORMAT to restrict)

Test plan

  • 1 test for clear (ANSI output)
  • 5 tests for fold (default width, custom width, word boundary, short line, empty)
  • 7 tests for expand/unexpand (default/custom tabs, multiple tabs, leading spaces, all mode)
  • 6 tests for envsubst (basic, braced, missing var, list vars, restrict, passthrough)
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • Full test suite passes (1640 tests)

Closes #545, Closes #546, Closes #548, Closes #551

- clear: output ANSI escape sequences to clear terminal (Closes #545)
- fold: wrap lines at specified width with -w/-s options (Closes #546)
- expand/unexpand: convert between tabs and spaces (Closes #548)
- envsubst: substitute environment variables in text (Closes #551)

Each builtin includes comprehensive unit tests.
@chaliy chaliy merged commit c239518 into main Mar 14, 2026
23 checks passed
@chaliy chaliy deleted the claude/process-issues-systematically-AEJJh branch March 14, 2026 05:16
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.

feat(builtins): add envsubst command feat(builtins): add expand command feat(builtins): add fold command feat(builtins): add clear command

1 participant