3
$\begingroup$

I have strange up-arrow behavior on command line Mathematica 8 versus Mathematica 9. Version 9 gives me history, where version 8 fails with escape codes. Any way to make them both work on the same system?

ubuntu@ip-10-45-11-134:~$ math
Mathematica 9.0 for Linux x86 (64-bit)
Copyright 1988-2013 Wolfram Research, Inc.

In[1]:= $KernelCount                                                                                                                                                               
    Out[1]= 0
    In[2]:= $KernelCount                                                                                                                                               
Out[2]= 0
In[3]:= ubuntu@ip-10-45-11-134:~$ math8                                                                                                                                            

Mathematica 8.0 for Linux x86 (64-bit)
Copyright 1988-2011 Wolfram Research, Inc.
In[1]:= $KernelCount
    Out[1]= 0
    In[2]:= ^[[A
    In[2]:= 
    ubuntu@ip-10-45-11-134:~$ 
$\endgroup$
7
  • 2
    $\begingroup$ I confirm this behavior. In V6 up arrow also don't work. I think this is a feature of the V9. $\endgroup$
    – ybeltukov
    Commented Dec 5, 2013 at 21:47
  • 2
    $\begingroup$ @ybeltukov is right. This is a new feature in version 9, so there is no way to make version 8 behave in exactly the same way. However, one can obtain a reasonable approximation: (11193) $\endgroup$ Commented Dec 5, 2013 at 21:50
  • $\begingroup$ After more googling, there is a package called rlwrap that does the trick! You can on ubuntu: apt-get install rlwrap Then up-arrow behaves correctly on Ubuntu precise 13.04, at least: ubuntu@ip-10-45-11-134:~$ rlwrap math8 $\endgroup$
    – bfschott
    Commented Dec 5, 2013 at 21:59
  • $\begingroup$ @bfschott Good catch! On Gentoo it also works fine. Could you post it as an answer? I will be possible to +1 you :) $\endgroup$
    – ybeltukov
    Commented Dec 5, 2013 at 23:07
  • 1
    $\begingroup$ @ybeltukov You might want to read my answer here where I showed this. In the same post, librik (working for Wolfram) explained that in version 9 they have linked the readline into the console math which makes that it works. $\endgroup$
    – halirutan
    Commented Dec 6, 2013 at 0:59

0

Browse other questions tagged or ask your own question.