ibm1620 has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Term::ReadLine and line-editing
by kcott (Archbishop) on May 06, 2022 at 00:14 UTC | |
by ibm1620 (Hermit) on May 06, 2022 at 13:50 UTC | |
|
Re: Term::ReadLine and line-editing
by Discipulus (Canon) on May 06, 2022 at 08:06 UTC | |
by ibm1620 (Hermit) on May 06, 2022 at 12:30 UTC |