Skip to content

Commit

Permalink
Fix --help output with GNU fmt(1)
Browse files Browse the repository at this point in the history
BSD fmt accepts two numeric parameters defining goal with and maximum
width. GNU's version, however, would interpret these numeric options as
files. Both GNU and BSD fmt(1) support the -w option to specify the
maximum width. GNU's version automatically sets the goal width based on
that value, but BSD fmt does not support setting the goal width in any
other way and does not automatically determine it either. We'll have to
live with the slightly less beautiful output on OS X and BSD, then.

Closes #5
  • Loading branch information
neverpanic committed Sep 2, 2015
1 parent 081b777 commit aefada8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google-font-download
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ url="http://fonts.googleapis.com/css"
# Usage message
usage() {
cols=$(tput cols) || cols=80
fmt $(( cols - 8 )) $cols >&2 <<-EOF
fmt -w $(( cols - 8 )) >&2 <<-EOF
USAGE
${0:-google-font-download} [OPTION...] [FONT...]
Expand Down Expand Up @@ -136,7 +136,7 @@ if [ $modern_getopt -eq 1 ]; then
fi
else
cols=$(tput cols) || cols=80
fmt $(( cols - 8 )) $cols >&2 <<-EOF
fmt -w $(( cols - 8 )) >&2 <<-EOF
Warning: Old getopt(1) detected.
Your version of getopt(1) does not correctly deal with whitespace and does not support long options. You may
Expand Down

0 comments on commit aefada8

Please sign in to comment.