Is is possible to have an autocomplete feature in the CLI of Wolfram Language kernel?
I use the Raspberry Pi edition.
Is is possible to have an autocomplete feature in the CLI of Wolfram Language kernel?
I use the Raspberry Pi edition.
No, the standard command line interface doesn't support auto-completion. Mathematica is really meant to be used with the notebook interface, and I do not recommend the command line except if it is really necessary.
If you are using a Raspberry Pi, then I agree that it is indeed really necessary. On an RPi 1 I find the front end unusably slow.
So you might try JMath, an alternative command line based front end which claims to provide auto-completion. I have never used it and I do not know if it works well. I also do not know if it still works with Mathematica 10 and 11, but there's a good chance that it would only need minor modifications.
Here are some hints on compiling it with recent Mathematica versions on Linux (I haven't actually tried this!):
Use -DMLINTERFACE=3
and link with -lML32i3
. The key is i3
. The 32
stands for 32-bit, which I think should be the case on the Raspberry Pi. This is necessary because the MathLink API is now at "interface version 4" ("i4", the default), but JMath may require "interface version 3" ("i3"). You may need to use gcc
instead of the mcc
tool which automates some things such as linking and may force -lML32i4
instead ... (not sure)
It may be necessary to link to -luuid
(wasn't needed with older versions)
If you read the documentation on this, you'll find that MathLink is now renamed to WSTP and all function names changed from the old ML prefix to the new WS one. Do not worry about this, as Mathematica still ships with the ML-prefixed libraries as well as the new WS-prefixed one. There's no functional difference between the two and you do not need to be concerned with the WS ones.