mirror of
https://github.com/zsh-users/zsh
synced 2024-10-06 07:59:22 +00:00
prefer col -bx to colcrt in helpfiles
This commit is contained in:
parent
bc160bc585
commit
cf02c2f0f3
|
@ -1,5 +1,7 @@
|
|||
2014-02-18 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* m0viefreak: Util/helpfiles: 32402: prefer col -bx to colcrt.
|
||||
|
||||
* m0viefreak: Util/helpfiles: 32405: Util/helpfiles: remove old
|
||||
example now shell code is integrated in distribution.
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue