Singular
https://www.singular.uni-kl.de/forum/

TAB Completion ?
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2065
Page 1 of 1

Author:  vinay [ Wed Feb 29, 2012 5:48 pm ]
Post subject:  TAB Completion ?

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

Author:  hannes [ Thu Mar 01, 2012 11:30 am ]
Post subject:  Re: TAB Completion ?

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

Author:  vinay [ Thu Mar 01, 2012 6:33 pm ]
Post subject:  Re: TAB Completion ?

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

Author:  hannes [ Fri Mar 02, 2012 11:02 am ]
Post subject:  Re: TAB Completion ?

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

Author:  vinay [ Sun Mar 04, 2012 6:29 am ]
Post subject:  Re: TAB Completion ?

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

Author:  hannes [ Mon Mar 05, 2012 1:18 pm ]
Post subject:  Re: TAB Completion ?

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)

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/