cyberneticlibrary

Fix grammar in tracked files

fix-grammarcommandsetup L1289
mitsuhiko/lucumr
What it does

Fix grammar and spelling in specified blog post files

Best for

Light grammar-only fixes on blog posts before publication; simple file-level corrections without structural changes.

Inputs
  • · File path (or list of paths) from $ARGUMENTS
  • · File contents to be edited
Outputs
  • · Grammar-corrected markdown files
  • · .bak backup of originals
Preconditions
  • · File exists and is readable
  • · Edit permissions available
Failure modes
  • · Backup file already exists → deletes it first
  • · No file specified → edits pending-change files auto-detected
  • · Non-existent path → likely fails silently
Trust signals
  • · Automatic .bak creation for manual diff verification
  • · Defaults to pending-change files if no explicit target
  • · Double-spacing rule after periods enforced