file_contents_sorter: add --group-cases-together -- a better case-insensitive sort

This commit is contained in:
Jacob Lifshay 2025-08-04 20:08:36 -07:00
parent a8f86514f4
commit 1d6bd5f7da
No known key found for this signature in database
3 changed files with 69 additions and 3 deletions

View file

@ -123,7 +123,8 @@ Note that this hook WILL remove blank lines and does NOT respect any comments.
All newlines will be converted to line feeds (`\n`).
The following arguments are available:
- `--ignore-case` - fold lower case to upper case characters.
- `--ignore-case` - fold lower case to upper case characters. this retains the original order of lines that differ only in case, so you probably want `--group-cases-together` instead.
- `--group-cases-together` - group lines that differ only in case together, so e.g. `c`, `b`, `a`, and `B` are sorted to `a`, `B`, `b`, and `c` instead of `B`, `a`, `b`, and `c`.
- `--unique` - ensure each line is unique.
#### `fix-byte-order-marker`