[PATCH] churn: obtain current terminal width if possible
Alexis S. L. Carvalho
alexis at cecm.usp.br
Thu Jul 19 11:21:19 CDT 2007
Thus spake Christian Ebert:
> * Alexis S. L. Carvalho on Thursday, July 19, 2007 at 09:30:47 -0300
> > 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?
yup
> > 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:
Hmm... true, but here (debian), if I "export COLUMNS", it becomes
visible to child processes, and it's even updated when the term size
changes. Both with bash and zsh. So I guess it can be useful...
Alexis
More information about the Mercurial-devel
mailing list