However, while talking a Mac user through installing a Perl program I wrote that uses readline, I discovered that installing the Gnu version from scratch is harder than I'd thought. First, I had him install the Xcode Command Line Tools as a prerequisite for perlbrew, and then perl v5.34 and cpanm. But cpanm Term::ReadLine::Gnu failed: The libreadline you are using is the libedit library. Use the GNU Readline Library. The simplest solution to this I could find involved installing homebrew. Homebrew's easy enough for me to use, but I felt like I was expending an awful lot of effort to provide a Mac terminal user with basic command-line editing.
Long story short, I installed Term::ReadLine::Perl and it mostly works (haven't fully tested it yet) but, because my prompt uses sequences from Term::ANSIColor, it writes '0m ' after the prompt! And if I remove those sequences, my keystrokes appear in white.
Since I normally don't have this kind of trouble doing something easy in Perl, I figure I'm overlooking something very obvious. Readline-Gnu "just worked" for me; can't Readline-Perl do the same, at least for line editing and input retrieval?
In reply to Term::ReadLine and line-editing by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |