trailfix

Crates.iotrailfix
lib.rstrailfix
version0.1.0
created_at2025-09-30 15:34:16.060713+00
updated_at2025-09-30 15:34:16.060713+00
descriptionTrim trailing whitespace and ensure single newline at EOF
homepage
repositoryhttps://github.com/alexykn/trailfix
max_upload_size
id1861290
size6,378
Alexander Knott (alexykn)

documentation

README

trailfix

Trim trailing whitespace and ensure single newline at EOF.

Usage

# Print fixed content to stdout
tf file.txt

# Multiple files
tf file1.txt file2.txt file3.txt

# Directory (non-recursive)
tf dir/

# Directory (recursive)
tf -r dir/

# Overwrite files in place
tf -o file.txt
tf --overwrite file.txt

# Redirect output to new file
tf file.txt > fixed.txt

# Pipe from stdin
curl https://example.com/file.txt | tf > fixed.txt

Installation

From crates.io

cargo install trailfix

From source

cargo install --path .

Building

cargo build --release
Commit count: 0

cargo fmt