3

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:~$ 
bfschott
  • 131
  • 2
  • 2
    I confirm this behavior. In V6 up arrow also don't work. I think this is a feature of the V9. – ybeltukov Dec 05 '13 at 21:47
  • 2
    @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) – Oleksandr R. Dec 05 '13 at 21:50
  • 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
    
    – bfschott Dec 05 '13 at 21:59
  • @bfschott Good catch! On Gentoo it also works fine. Could you post it as an answer? I will be possible to +1 you :) – ybeltukov Dec 05 '13 at 23:07
  • 1
    @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. – halirutan Dec 06 '13 at 00:59
  • @halirutan Thanks! I've read your post a long time ago and totally forget it. – ybeltukov Dec 06 '13 at 01:03
  • The answer might be a duplicate, but I think the original question is poorly phrased and hard to find. "How do I efficiently navigate the command line interface in Mathematica" is hardly an indication that it will answer my question. – bfschott Dec 07 '13 at 01:56

0 Answers0