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:
parent
7dcf64ef11
commit
34cfc3cf12
4
scmfmt
4
scmfmt
@ -21,9 +21,9 @@ i\
|
|||||||
|
|
||||||
bl' |
|
bl' |
|
||||||
sed -e '1s/^/./' -e 's/^ /./' |
|
sed -e '1s/^/./' -e 's/^ /./' |
|
||||||
fmt -p |
|
par -P=. |
|
||||||
awk '
|
awk '
|
||||||
BEGIN { LIMIT = 65 }
|
BEGIN { LIMIT = 72 }
|
||||||
NR == 1 || /^[^\.]/ || length($0) < LIMIT {
|
NR == 1 || /^[^\.]/ || length($0) < LIMIT {
|
||||||
sub(/^\./, NR == 1 ? "" : " ");
|
sub(/^\./, NR == 1 ? "" : " ");
|
||||||
print;
|
print;
|
||||||
|
Loading…
Reference in New Issue
Block a user