[Rt-devel] PATCH: use Term::ReadLine only when needed
Jesse Vincent
jesse at bestpractical.com
Fri Apr 28 12:03:09 EDT 2006
On Wed, Apr 26, 2006 at 03:14:09PM +0200, David Schweikert wrote:
> Hi,
>
> The following patch for the rt-command avoids initializing the terminal
> with Term::ReadLine unless it is needed (rt shell).
>
> Without this patch, you can notice the cursor moving around whenever you
> execute an rt command (like rt list or rt edit) and if you resize the
> window, you get very unpleasing errors.
This patch makes the test suite start failing tests. I suspect it's just
a test suite inconsistency. I've forwarded it on to Kevin to look at.
(probably on monday)
> Cheers
> David
>
> --- bin/rt.in~ 2006-03-21 03:18:44.000000000 +0100
> +++ bin/rt.in 2006-04-26 14:48:02.742296000 +0200
> @@ -82,9 +82,7 @@
> my $session = new Session("$HOME/.rt_sessions");
> my $REST = "$config{server}/REST/1.0";
>
> -my $term = new Term::ReadLine 'RT CLI';
> my $prompt = 'rt> ';
> -my $TERM_OUT = $term->OUT || \*STDOUT;
>
> sub whine;
> sub DEBUG { warn @_ if $config{debug} >= shift }
> @@ -149,6 +147,7 @@
>
> sub shell {
> $|=1;
> + my $term = new Term::ReadLine 'RT CLI';
> while ( defined ($_ = $term->readline($prompt)) ) {
> next if /^#/ || /^\s*$/;
>
>
> --
> David Schweikert | phone: +41 44 632 7019
> System manager ISG.EE | walk: ETH Zentrum, ETL F24.1
> ETH Zurich, Switzerland | web: http://people.ee.ethz.ch/dws
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
> Best Practical is hiring! Come hack Perl for us: http://bestpractical.com/about/jobs.html
>
--
More information about the Rt-devel
mailing list