Command History Arrow keys are not working in Command Prompt Windows

Viewed 191

I was trying to run one of the perl files in command prompt from the path where the file in situated. Once I enter the debug mode, command history down and up arrow keys functionalities are not working. I have tried many properties settings, currently it is like this enter image description here

Please guide me through how to fix this? It is becoming difficult to debug. Thanks in Advance.

1 Answers

The prompt you get inside the Perl debugger isn't provided by your shell, so it should not be surprising that it has different command history features to your shell prompt.

The perldebug manual page documents the Perl debugger and has a section entitled Readline Support / History in the Debugger which says this:

As shipped, the only command-line history supplied is a simplistic one that checks for leading exclamation points. However, if you install the Term::ReadKey and Term::ReadLine modules from CPAN (such as Term::ReadLine::Gnu, Term::ReadLine::Perl, ...) you will have full editing capabilities much like those GNU readline(3) provides. Look for these in the modules/by-module/Term directory on CPAN. These do not support normal vi command-line editing, however.

A rudimentary command-line completion is also available, including lexical variables in the current scope if the PadWalker module is installed.

Without Readline support you may see the symbols "^[[A", "^[[C", "^[[B", "^[[D"", "^H", ... when using the arrow keys and/or the backspace key.

So you'll need to install Term::ReadKey and one of the Term::ReadLine::* modules.

Related