expand
Convert tab characters to spaces in files or standard input. Use configurable tab stops to normalize indentation to spaces. Returns JSON output by default.
Instructions
Convert tab characters to spaces in files or stdin. Read-only, no side effects (does not modify files). Returns JSON with the converted text by default; use --raw for plain output. Use configurable tab stops to control spacing. Use to normalize indentation to spaces. Not for converting spaces to tabs — use 'unexpand' for the reverse operation. See also 'unexpand'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write expanded text without a JSON envelope. | |
| tabs | No | Tab stop width. | |
| paths | No | Files to read, or '-' for stdin. Defaults to stdin. | |
| encoding | No | Text encoding (default: utf-8). Use 'auto' for BOM/autodetection. | utf-8 |
| max_lines | No | Maximum JSON lines to emit. | |
| show_encoding | No | Include encoding detection metadata in JSON result. | |
| encoding_errors | No | How to handle encoding errors (default: replace). | replace |
| encoding_profile | No | Locale-aware encoding fallback profile for auto-detection. |