[PATCH] churn: obtain current terminal width if possible
Christian Ebert
blacktrash at gmx.net
Thu Jul 19 09:43:26 CDT 2007
* Alexis S. L. Carvalho on Thursday, July 19, 2007 at 09:30:47 -0300
> Thus spake Christian Ebert:
>> # HG changeset patch
>> # User Christian Ebert <blacktrash at gmx.net>
>> # Date 1184835530 -7200
>> # Node ID ca06b2d20e45e91a7598f47d1dacd0958c2b4db4
>> # Parent 382520bacc17886e0e2fe7fb798a0a5218cf9db1
>> churn: obtain current terminal width if possible
>
> This should really go into some kind of get_tty_width function so that
> it's only called when needed.
Oops, that was my first intention, then thought it will always
get called (which it does, when churn is called), but w/o
function it's called when loading the extension w/o actually
running it. Right?
Will change that.
> And it'd be nice to respect $COLUMNS as well.
Ah, does this work in other architectures? Here, on MacOS, I can
only do:
$ echo $COLUMNS
80
but:
$ env | grep COLUMNS
gives nothing. Similarly:
>>> print os.getenv('COLUMNS')
>>> None
Of course if it gives something on other machines, I'd be happy
to comply ;)
c
--
keyword extension for Mercurial (http://selenic.com/mercurial):
<http://www.blacktrash.org/hg/hgkeyword/>
Mercurial crew development repository + keyword extension:
<http://www.blacktrash.org/hg/hg-crew-keyword/>
More information about the Mercurial-devel
mailing list