I want to know if anyone experiences the issue with mathematica-12 with bash-5?

I am using the command line interface of mathematica. Now when I do up arrow or down arrow to go to history, it does not produce the previous commands rather


Now it does not happen with bash-4. Is there any way around?

My mathematica version is:

 Mathematica 12.0.0 Kernel for Linux x86 (64-bit)

Bash version is:

GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)

Of course bash-completion works normally in terminal, only while using mathematica it does not work.

  • 1
    $\begingroup$ look for rlwrap with your distro package manager $\endgroup$ – Fortsaint Nov 21 '19 at 12:04
  • $\begingroup$ @Fortsaint, Well, I have installed that locally and after using rlwrap math I can see that it enables history. However usual math does not. I can of course redefine math=rlwrap math. But any other thoughts apart from this? $\endgroup$ – Boogeyman Nov 21 '19 at 12:12
  • $\begingroup$ I do not know about Bash 5. I use bash 4..4.20 and Wolfram Engine 12, which include wolframscript. When I run wolframscript from the terminal I do no have that problem you mentioned. Try wolframscript instead of math $\endgroup$ – Fortsaint Nov 21 '19 at 12:18
  • $\begingroup$ Unfortunately wolframscript also shows same behavior as math. I also checked that it only appears with bash-5, In bash-4 I did not have any problem. $\endgroup$ – Boogeyman Nov 21 '19 at 12:20
  • $\begingroup$ You can even have autocompletion with rlwrap. Create the following text file Names["*"]~StringRiffle~"\n" // Export["WLNames.txt",#,"Text"]&. Then create your custom version of math that execute rlwrap -f WLNames.txt -pgreen wolframscript -c Dialog[] . This is my custom math with some additional initialization functions github.com/Ludwiggle/math/blob/master/math ` $\endgroup$ – Fortsaint Nov 21 '19 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.