libtecla 1.6.1 review

Download
by rbytes.net on

The tecla library provides UNIX and LINUX programs with interactive command line editing facilities, similar to those of the unix tcs

License: MIT/X Consortium License
File size: 506K
Developer: Martin C. Shepherd
0 stars award from rbytes.net

The tecla library provides UNIX and LINUX programs with interactive command line editing facilities, similar to those of the unix tcsh shell. In addition to simple command-line editing, it supports recall of previously entered command lines, TAB completion of file names, and
in-line wild-card expansion of filenames.

The internal functions which perform file-name completion and wild-card expansion are also available externally for optional use by programs, along with a module for tab-completion and lookup of filenames in a list of directories.

Note that special care has been taken to allow the use of this library in threaded programs. The option to enable this is discussed in the Makefile, and specific discussions of thread safety are presented in the included man pages.

Installation:

To compile and optionally install the library, it is first necessary to create a makefile for your system, by typing:

./configure

The Makefile that this generates is designed to install the files of the library in subdirectories of /usr/local/. If you would prefer to install them under a different directory, you can type:

./configure --prefix /wherever

Where you would replace /wherever with your chosen directory. Other command-line options are available, and can be listed by typing:

./configure --help

Having run the configure script, you are then ready to make the library. To do this, just type:

make

What 'make' does depends on whether the configure script knows about your system. If the configure script doesn't know anything specific about your system, it will arrange for 'make' to produce the static tecla library, called libtecla.a, and if possible, the reentrant
version of this called libtecla_r.a. If it does know about your system, it will also create shared libraries if possible.

If you are on a system that isn't known, and you would like shared libraries to be compiled, please read the file called PORTING to see how this can
be achieved.

To install the library, its include file and it manual pages, type:

make install

Note that this will also compile the library if you haven't already done so.

Having compiled the library, if you wish, you can test it by running the demo programs. After building the library, you should find two programs, called demo and demo2, in the current directory.

The first of the demos programs reads input lines from the user, and writes what was typed back to the screen. While typing a line of input, you can experiment with line editing, tab completion, history recall etc.

For details about these line editing features, see the man page gl_get_line(3). If you haven't installed this yet, you can see it anyway by typing:

nroff -man man3/gl_get_line.3 | more

The second demo program, called demo2, demonstrates command-completion
with the UNIX PATH. If you type in a partial command name, and press TAB, the command name will be completed if possible, and possible completions will be listed if it is ambiguous.

When you then enter the line, the demo program then prints out the full pathname of the command that you typed. If you type anything after the command name, filename completion with the tab key reverts to its default behavior of completing filenames in the current directory.

libtecla 1.6.1 keywords