scmfmt - Use par instead of fmt and increase default width

The `-p` option is only available in OpenBSD. As there's no standard
way of ignoring lines by prefix, use `par`, which at least will be
installable almost everywhere.
This commit is contained in:
Adolfo Perez Alvarez 2023-09-12 17:02:57 +02:00
parent 7dcf64ef11
commit 34cfc3cf12
1 changed files with 2 additions and 2 deletions

4
scmfmt
View File

@ -21,9 +21,9 @@ i\
bl' |
sed -e '1s/^/./' -e 's/^ /./' |
fmt -p |
par -P=. |
awk '
BEGIN { LIMIT = 65 }
BEGIN { LIMIT = 72 }
NR == 1 || /^[^\.]/ || length($0) < LIMIT {
sub(/^\./, NR == 1 ? "" : " ");
print;