git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4250945
)
align long options in usage
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 24 Jan 2020 23:57:04 +0000
(
00:57
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 16 Feb 2020 21:35:47 +0000
(22:35 +0100)
barcat
patch
|
blob
|
history
diff --git
a/barcat
b/barcat
index e4328c4cd3b949b24482676fa4d674a8176ef44a..57145f2798870b8146478c5f6d3e6d2e065b8ee6 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-82,6
+82,7
@@
GetOptions(\%opt,
$pod =~ s/^=over\K/ 25/m; # indent options list
$pod =~ s/^=item \N*\n\n\N*\n\K(?:(?:^=over.*?^=back\n)?(?!=)\N*\n)*/\n/msg;
$pod =~ s/[.,](?=\n)//g; # trailing punctuation
$pod =~ s/^=over\K/ 25/m; # indent options list
$pod =~ s/^=item \N*\n\n\N*\n\K(?:(?:^=over.*?^=back\n)?(?!=)\N*\n)*/\n/msg;
$pod =~ s/[.,](?=\n)//g; # trailing punctuation
+ $pod =~ s/^=item \K(?=--)/____/gm; # align long options
# abbreviate <variable> indicators
$pod =~ s/\Q>.../s>/g;
$pod =~ s/<(?:number|count|seconds)>/N/g;
# abbreviate <variable> indicators
$pod =~ s/\Q>.../s>/g;
$pod =~ s/<(?:number|count|seconds)>/N/g;
@@
-98,6
+99,7
@@
GetOptions(\%opt,
$parser->parse_string_document($pod);
$contents =~ s/\n(?=\n\h)//msg; # strip space between items
$parser->parse_string_document($pod);
$contents =~ s/\n(?=\n\h)//msg; # strip space between items
+ $contents =~ s/^ \K____/ /gm; # nbsp substitute
print $contents;
exit;
},
print $contents;
exit;
},