Michael Somos on Mon, 26 Aug 2002 19:13:05 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

gp + readline + script = mess


pari-dev,

This is from a 'script' on a SunOS 5.8 machine processed with 'cat -vt'

==============================================================================
Script started on Mon Aug 26 18:53:10 2002
this is .cshrc on danube^M
CSHLVL=3^M
this is .aliases on danube^M
danube:/u/home/somos/u/work/pari> echo $TERM^M
vt100^M
danube:/u/home/somos/u/work/pari> gp^M
Reading GPRC: /u/home/somos/.gprc ...Done.^M

          GP/PARI CALCULATOR Version 2.2.4 (development CHANGES-1.490)^M
                 UltraSparc (MicroSparc kernel) 32-bit version^M
              (readline v2.2 enabled, extended help not available)^M

                       Copyright (C) 2002 The PARI Group^M

PARI/GP is free software, covered by the GNU General Public License, and ^M
comes WITHOUT ANY WARRANTY WHATSOEVER.^M

Type ? for help, \q to quit.^M
Type ?12 for how to get moral (and possibly technical) support.^M

   realprecision = 28 significant digits^M
   seriesprecision = 16 significant terms^M
   format = g0.28^M

parisize = 4000000, primelimit = 500000^M
? 1+2^M
%1 = 3^M
? quit^M
Goodbye!^M
danube:/u/home/somos/u/work/pari> exit
script done on Mon Aug 26 18:53:33 2002
==============================================================================

That was exactly what I expected. A few extra CR=^M characters at the end
of most lines. Note readline v2.2 is used. Now compare with the exact same
input using a Mandrake Linux 8.1 box with readline v4.2.

==============================================================================
Script started on Mon Aug 26 18:57:28 2002
this is .cshrc on feynman^M
CSHLVL=3^M
this is .aliases on feynman^M
feynman:/home/somos/u/work/pari/paribug5> echo $TERM^M^M
vt100^M
feynman:/home/somos/u/work/pari/paribug5> gp^M^M
Reading GPRC: /home/somos/.gprc ...Done.^M
^M
          GP/PARI CALCULATOR Version 2.2.4 (development CHANGES-1.491)^M
                i686 running linux (ix86 kernel) 32-bit version^M
              (readline v4.2 enabled, extended help not available)^M
^M
                       Copyright (C) 2002 The PARI Group^M
^M
PARI/GP is free software, covered by the GNU General Public License, and ^M
comes WITHOUT ANY WARRANTY WHATSOEVER.^M
^M
Type ? for help, \q to quit.^M
Type ?12 for how to get moral (and possibly technical) support.^M
^M
   realprecision = 28 significant digits^M
   seriesprecision = 16 significant terms^M
   format = g0.28^M
^M
parisize = 4000000, primelimit = 500000^M
? ^M^[[K? 1^M^[[K? 1+^M^[[K? 1+2^M^[[K? 1+2^M
%1 = 3^M
? ^M^[[K? q^M^[[K? qu^M^[[K? qui^M^[[K? quit^M^[[K? quit^M
Goodbye!^M
feynman:/home/somos/u/work/pari/paribug5> exit^M^M

Script done on Mon Aug 26 18:57:41 2002
==============================================================================

First, there are a few more CR=^M characters, but that is a minor matter.
However, notice the two input lines. Every single character I typed is
preceeded by "^M^[[K...". In other words, it seems the readline was always
rewriting the line. This makes a mess of the script. Is there a way to
disable readline just for one session, or otherwise modify its behavior?
I tried 'set TERM=dumb' but this didn't change the behavior of readline.
Perhaps I have to go back to an earlier version of readline? Has anyone
else noticed this behavior of readline?

Shalom, Michael