Releases: TypifyDev/screp
Releases · TypifyDev/screp
v0.3.0.0
What's New
New: scredit - sed with parser combinators
Find and replace using the same Parsec DSL as screp:
# Replace digits with NUM
echo "hello 123 world 456" | scredit "some digit" -r "NUM"
# => hello NUM world NUM
# In-place editing
scredit "string \"TODO\"" -r "DONE" -i -R src/
# Dry-run with verbose
scredit "some digit" -r "X" -i -n -v *.txtscredit Features
- Same pattern DSL as screp (some digit, string "X", manyTill, etc.)
- Stdin support (default) or file arguments
- In-place editing (
-i) or stdout (default) - Recursive directory traversal (
-R) - File filtering (
--include,--exclude,--exclude-dir,-e) - Dry-run mode (
-n) to preview changes - Verbose mode (
-v) to show files being edited
Testing
- Comprehensive test suite with 50 tests for scredit
- Unit tests for streamEdit and glob matching
- Integration tests for all CLI options
v0.2.0.0
Grep-compatible CLI options
- `-i` / `--ignore-case` - Case-insensitive search
- `-l` / `--files-with-matches` - Print only filenames with matches
- `-L` / `--files-without-match` - Print only filenames without matches
- `-h` / `--no-filename` - Suppress filename prefix
- `-A` / `--after-context` - Show lines after match
- `-B` / `--before-context` - Show lines before match
- `-C` / `--context` - Show lines before and after match
- `--color` / `--colour` - Colored output (always, never, auto)
File filtering
- `--include` - Only search files matching glob pattern
- `--exclude` - Skip files matching glob pattern
- `--exclude-dir` - Skip directories matching glob pattern
Other improvements
- Stdin support (use `-` or omit file arguments)
- Silently skip unreadable/binary files
- Comprehensive test suite"')