---
obj: application
repo: https://github.com/wr7/refold
rev: 2025-01-30
---

# refold
refold is a commandline tool for performing text-wrapping, similar to unix `fold`. Unlike `fold`, refold will recombine lines before performing line-wrapping, and it will automatically detect line prefixes.

## Usage
Usage: `refold [FLAGS...]`

refold reads from stdin and writes to stdout

### Options

| Option                                     | Description                                                                                                                              |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `--width, -w <width>`                      | Sets the width to wrap at (default 80).                                                                                                  |
| `--prefix, -p <prefix>`                    | Sets the prefix for each line (default: auto detect). Set to an empty string to disable prefixing entirely.                              |
| `--boundaries, -b, --unicode-boundaries`   | Sets the split mode to "boundaries" mode (default). In boundaries mode, line wrapping may occur in-between unicode breakable characters. |
| `--spaces, -s`                             | Sets the split mode to "space" mode. In space mode, line wrapping may occur in-between words separated by ASCII spaces.                  |
| `--characters, -c, --break-words, --break` | Sets the split mode to "character" mode. In character mode, line wrapping may occur in-between any two characters.                       |
