Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 4/4] Util/helpfiles: prefer 'col -bx' over 'colcrt'
- X-seq: zsh-workers 32402
- From: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 4/4] Util/helpfiles: prefer 'col -bx' over 'colcrt'
- Date: Mon, 17 Feb 2014 05:07:59 +0100
- Cc: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EbSzTZmBWYAFj8NysaNDA8t/rLkphRaxgUqem5XguZ0=; b=AvMDOsCPw+5cToaiGxovb3sRjMm9xMvf46pJfrpUXwSM/E3S/5Y6YSmh7W7FrqcvgA L9CAs4AgcctyEmBgJtgTyEtVIh3/QVDxcyr0qbODi15vJ/yp1h2XO9j8FJVSDv8jmk9i L2ArSm5J24rbHfbOGiTXMVFyVnAgYj6av8ptoYBxRJObq+z1hc76e1Shk1yeNT2oGHsC 4pvTUmnIhSK9k6TrrvZqkuR7Y0n+hC6KIjadkCdHvEcK2pBIoDPkJbh5BYbv2M9JAGmu OZyOa3Weeg2f01EnQPfMKMqI2XRmf8rH4NwWI92ccclwTurj1FojPseAifRiyPV4/dmF cS/g==
- In-reply-to: <1392610079-2632-1-git-send-email-m0viefreak.cm@googlemail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1392610079-2632-1-git-send-email-m0viefreak.cm@googlemail.com>
Even when given the '-' option colcrt removes any underscore
characters from the text, ending up with all words like
'CHASE_LINKS' being converted to 'CHASE LINKS'.
'col -bx' works fine in those cases. Since as of the lastest
changes both variants are tried, avaibility of the command on
different systems is not an issue and it is safe to prefer 'col'.
---
Util/helpfiles | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Util/helpfiles b/Util/helpfiles
index 9909a1d..699ca83 100755
--- a/Util/helpfiles
+++ b/Util/helpfiles
@@ -67,17 +67,17 @@ if(system('man ' . $args) || !(-s $mantmp)) {
}
$args = "$mantmp >$coltmp";
unlink($coltmp);
-&Info('attempting colcrt - ', $args);
-if(system('colcrt - ' . $args) || !(-s $coltmp)) {
- unlink($coltmp);
- &Info('attempting col -bx <', $args);
+&Info('attempting col -bx <', $args);
# The x is necessary so that spaces don't turn into tabs, which messes
# up the calculations of indentation on machines which randomly wrap lines
# round to the previous line (so you see what we're up against).
- if(system('col -bx <' . $args) || !(-s $coltmp)) {
+if(system('col -bx <' . $args) || !(-s $coltmp)) {
+ unlink($coltmp);
+ &Info('attempting colcrt - ', $args);
+ if(system('colcrt - ' . $args) || !(-s $coltmp)) {
unlink($mantmp);
unlink($coltmp);
- &Die('colcrt and col -bx both failed');
+ &Die('col -bx and colcrt - both failed');
}
}
unlink($mantmp) || &Die('cannot remove tempfile ', $mantmp);
--
1.9.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author