Giovanni Bajo <email@example.com> writes:
> svnmerge automatically formats and word-wraps its help screens to the user
> console width (if it manages to extract it). It has several methods (for
> different operating systems), and this patch adds another fallback: it tries
> calling "stty -a" and parsing its output with a simple regular expression.
> This should work well on some UNIX flavours (including Linux).
As GNU coreutils 5.93 documents that stty -a prints "all current
settings in human-readable form", I wonder whether some
implementation could make the word "columns" depend on the
locale. The specification of "stty" in IEEE Std 1003.1, 2004
Edition does not say anything about setting or retrieving the
size of the console, but it requires at least the "speed",
"ispeed", and "ospeed" words in "stty -a" output to be unaffected
by locale; perhaps this is why GNU coreutils 5.93 leaves
GNU coreutils also supports "stty size", which outputs only
the rows and columns and may thus be more reliable to parse.
However, I don't know how widely that's supported elsewhere.
Received on Sat Jan 7 18:23:30 2006
- application/pgp-signature attachment: stored