Hacker News new | ask | show | jobs
by njonsson 5312 days ago
Making semantic line breaks (such as for bullets) is understandable, but it still feels wrong that we’re otherwise doing the job of `fold`. I started breaking lines in commit messages because it’s convention, but I still believe this is a tooling issue.

This shell script wraps wide commit messages to the width of your console.

    GIT_PAGER="fold -s -w`stty size | awk '{print $2}'` | less" git log $@
1 comments

You might be interested in the program "par", which uses dynamic programming to optimize the line breaks, and can automatically handle such things as text prefixed by "> ".

http://www.nicemice.net/par/