The readline library provides a set of functions for use by applications that let users edit command lines as they are typed in. Both emacs and vi editing modes are available. The readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.
readline-4.0: description + notes
The history facilites are also placed into a separate library,
libhistory
, as part of the build process. The History library may be used withoutlibreadline
in applications that desire its capabilities.In
/usr/freeware/share/readline
there are several example programs that use Readline features. The rl program (also installed in/usr/freeware/bin
as readline) is of particular interest. It is a command-line interface to Readline, suitable for use in shell scripts in place of read.
Developers intending to use this library for development of other freeware packages or their own software applications will need to be familiar with a few peculiarities due to the way that this library is packaged and installed. The reasons for this installation strategy are described further in the fw_common product release notes.The header files and libraries in this package are installed into
/usr/freeware
. This means that when building software using this distribution oflibreadline
orlibhistory
you should be sure to do the following:
- To let the compilers find the library's header files at compile time, include the following flag on your compile lines:
- -I/usr/freeware/include/readline
To let the linker find the library's archive or shared object files at link time, include the following flag on your link lines:
-L/usr/freeware/lib (if using o32 ABI) -L/usr/freeware/lib32 (if using n32 ABI) -L/usr/freeware/lib64 (if using 64 ABI) Additionally, include the flag below on your link lines. It will let the binary locate the shared object library files when the application is run. This is required since the shared objects are stored in these /usr/freeware
subdirectories, which are not searched by the run-time linker by default.
-rpath /usr/freeware/lib (if using o32 ABI) -rpath /usr/freeware/lib32 (if using n32 ABI) -rpath /usr/freeware/lib64 (if using 64 ABI) Finally, if you are building an installable package for inst (contributing to freeware, for example) be sure to make your package depend upon this package. Add the following line to your spec
file:prereq ( fw_readline.sw.lib 1230000000 1239999900 ) # if using o32 or n32 ABI prereq ( fw_readline.sw64.lib 1230000000 1239999900 ) # if using 64 ABI Following these guidelines will let your application safely and easily use the software in this package.
To auto-install this package, go back and click on the respective install icon.