Read-only forum archive

TAB Completion ?

TAB Completion ?

vinay · Wed Feb 29, 2012 5:48 pm

I just now compiled Singular-3-1-4 from source code on Ubuntu-12.04 (development branch), AMD-Athlon Processor server. The compilation was successful. However after compilation I seem to have lost some features of the Singular command window like TAB completion (of command). Further the usual key-strokes like backspace and arrow keys produce their escape characters (e.g. ^H, ^[[A,^[[C, etc). In other words the command window behaves like VT-100 terminal.

Any suggestions?

Thanks in advance.

VInay

Re: TAB Completion ?

hannes · Thu Mar 01, 2012 11:30 am

Install readline (and the development package to readline)
(configure searches for libreadline.a/libreadline.so and readline.h)
Rerun configure and make at least in the subdirectories
Singular and kernel:
Code:
cd Singular
./config.status --recheck
./config.status
cd ../kernel
make install
cd ../Singular
make install

Re: TAB Completion ?

vinay · Thu Mar 01, 2012 6:33 pm

Ah! Thanks a lot. The libreadline-dev was the culprit. I didnt notice before compilation that this package was missing.

by the way how come it was not detected by config?

-- VInay

Re: TAB Completion ?

hannes · Fri Mar 02, 2012 11:02 am

readline is optional.
If it is not found by configure a different way for input is used,
Depending on the existing libraries there are the following possibilities:
static readline, dynamic readline, emulated readline, fgets.
the Singular command
Code:
system("with");
outputs
(beside other tings) the chosen method

Re: TAB Completion ?

vinay · Sun Mar 04, 2012 6:29 am

Can you please explain the difference between all 4? And how it is determined?

I could not trace much. I found variables in Singular/configure called ac_cv_*_readline. However I could not find the place these variables are set!

Also I found the #define's called HAVE_DYN_RL, HAVE_READLINE and FEREAD.


-- VInay

Re: TAB Completion ?

hannes · Mon Mar 05, 2012 1:18 pm

static readline: input via readline, requires libreadline.* and readline.h
uses HAVE_READLINE
emulated readline: input with line editing, requires libtermcap or libncurses
or libcurses, uses HAVE_FEREAD
fgets: input via fgets (if all other fail)
dynamic readline: input via readline if libreadline.so is available at runtime
used HAVE_DYN_RL, will never be set automaically by configure
(it is thought for binary distributions: works also without libreadline.so,
but take advantage of it if possible)