perl-RL - Perl interface to the readline library
||ALT Linux Sisyphus
This module provides an interface to the readline library. On Linux,
it would be the readline library provided by GNU. On OS X, it is
the emulated readline library that is actually the libedit library.
This library only provides the subset of functionality that both
provide, so some things are missing intentionally. This also
includes an interface to the history library functions.
If you're using a Mac, you may notice bash reads .inputrc since
bash is statically linked with GNU readline, but this library isnt
available for linking into other programs. I've also noticed libedit
doesn't handle ansi escape codes in the prompt well, even though
it mentions \1 and \2 in its header file (the codes are used around
ansi escape codes in readline to specify they are 0 width).
No subroutines are exported, you must access all within the RL
namespace. for example, instead of `readline($prompt)', you
would write `RL::readline($prompt)'.
This package also comes with a script called pl, which is a repl
for the Perl language, to quickly test commands, or do mathematical
Recommendation: Add the following to your .editrc file to get
previous and next history entries that match your partially typed
command (only for OS X's readline):
bind ^[[A ed-search-prev-history
bind ^[[B ed-search-next-history
For Linux, you would put this into your .inputrc:
- Add the following line to /etc/apt/sources.list:
rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus i586 autoimports
rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
- Update the package index:
# sudo apt-get update
- Install perl-RL rpm package:
# sudo apt-get install perl-RL