Skip to content

The synopsis should probably show the disabling of the autohistory in ReadLine #21

Description

@greenonline

If you use the code in the synopsis as is, then there are duplicate entries, for each input, in the history, and one has to use the up arrow key twice to access the preceding history item(s).

This is because Term::ReadLine also writes to the history, by default, and then UI.pm writes to the history again in _tt_readline().

The code in the synopsis should probably include the following line(s) in order to disable the autohistory and hence the duplication.

# This disables autohistory
$term->MinLine(MAX);

As the code in the synopsis currently stands:

  • If you select the default inputs, then the first up key with give "blue" and the second a blank entry.
  • If you select a non-default input then that input will be shown twice, i.e. first up key gives "green" and then the second up key gives "green", or (if the index was used to select), "3" and then "3"

Which isn't desired behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions