hk util mixed-line-ending
- How to hail it:
hk util mixed-line-ending [-d --diff] [-f --fix] <FILES>… - Effect: modifies state (it touches, as well as looks)
Spots mixed line endings in the cargo, and mends them if ye ask.
Mending brings every line to the ending most of the file's lines use, or to LF when LF and CRLF are tied. A lone CR is left alone.
Cargo it takes
<FILES>…— The files to inspect or mend
Flags to fly
-d --diff— Write out a diff of the change. Cannot be used withfix.-f --fix— Mend mixed line endings by bringing them all to the most frequent one (LF on a tie)-h --help— Print help, for when ye've lost yer bearings
Tales from the deck
Inspect the cargo for mixed line endings, or bring them all to the most frequent one.
sh
hk util mixed-line-ending README.md
hk util mixed-line-ending --fix README.mdFurther charts
Built-in linters and utilities: the standing crew · Troubleshooting: the ship's log · All the bosun's calls
