Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help is not printed #5

Closed
hydrapolic opened this issue Sep 1, 2015 · 2 comments
Closed

Help is not printed #5

hydrapolic opened this issue Sep 1, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@hydrapolic
Copy link

While trying to run the current master I get:

$ ./google-font-download
./google-font-download: Error: No font families given

fmt: cannot open '311' for reading: No such file or directory
fmt: cannot open '319' for reading: No such file or directory

What exactly is the meaning of:

usage() {
cols=$(tput cols) || cols=80
fmt $(( cols - 8 )) $cols >&2 <<-EOF

As I check the man page of fmt:
SYNOPSIS
fmt [-WIDTH] [OPTION]... [FILE]...

DESCRIPTION
Reformat each paragraph in the FILE(s), writing to standard output.
The option -WIDTH is an abbreviated form of --width=DIGITS.

Something like this works for me:
fmt --width=$(( cols - 8 )) >&2 <<-EOF

I'm using Coreutils 8.24.

@neverpanic
Copy link
Owner

Great, so yet another incompatibility between a BSD and a GNU userland :/

It seem's both BSD's and GNU's fmt(1) support the -w option, so that's probably the way to go. GNU's version will then set the goal width automatically (yay), BSD's will not. The outcome will probably be that help output doesn't look as nice on OS X.

@neverpanic neverpanic added the bug label Sep 1, 2015
@neverpanic neverpanic added this to the next milestone Sep 1, 2015
@neverpanic neverpanic self-assigned this Sep 1, 2015
@hydrapolic
Copy link
Author

Thanks, works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants