All projects

FixEOL

Fixes the line-endings of the specified file(s). The line-ending used can be specified via the command-line.

dotnet-core-build dotnet-core-release

fixeol normalizes line endings for one or more files, directories, or wildcard patterns.

Click here for the latest release.

Examples

fixeol --recursive --eol crlf *.css *.js
fixeol --eol lf --encoding utf8 README.md
fixeol --dry-run --recursive --eol lf --encoding utf8 "*.cs"
fixeol /r /backup src\*.cs
fixeol --encoding utf8 --eol crlf -r *.code-workspace *.cs *.csproj *.bat -exclude specific-file.bat

Usage

fixeol [options] "file-patterns" ["file-patterns"] [...]

File patterns can be specific files, directories, or wildcards. Use --recursive, -r, or -s to apply patterns to subdirectories.

Includes are optional by default: missing literal files or directories, patterns whose parent directory is missing, and wildcards with no matches are skipped. Existing matches are still processed. If no files match (or all matches are excluded), fixeol does nothing and returns exit code 0. This also applies to --dry-run.

For example, a shared normalization task can include Makefile even in repositories that do not have one:

fixeol --recursive --eol lf --encoding utf8 Makefile "*.cs" "*.csproj"

At least one include argument is still required. Invalid arguments or paths and real directory enumeration, access, read, or write failures remain errors with nonzero exit codes. Unknown options are errors; prefix a file name beginning with - with ./ (for example, ./-notes.txt) so it is treated as a path.

Options

On Windows, options can use -, --, or / prefixes. Use ! to turn off a boolean option from the command line, for example --!verbose.

Environment Variables

Command-line arguments override environment variables. Use semicolons to separate multiple fixeol_exclude patterns.