sub doInput($$;$)
{
my $term = ${$_[0]};
my $selectList = $_[1]; # This is already a REFERENCE!
my $promptStr = $_[2] if $_[2];
# Set the prompt string to empty string if there is no 3rd arg.
! $promptStr and $promptStr = '';
# The code below, up to the return(), is pulled from the pftp
# readline example file. Thanks to Hiroo Hayashi for the Gnu
# ReadLine code.
my $attribs = $term->Attribs;
# This is the list of things to expand on.
$attribs->{completion_word} = $selectList;
$attribs->{completion_append_character} = '';
$attribs->{completion_entry_function} =
$attribs->{'list_completion_function'};
# Check the length of $promptStr, if > 78 characters, append
# newline
length $promptStr > 78 and $promptStr .= "\n";
my $userInput = $term->readline($promptStr);
$attribs->{completion_append_character} = ' ';
$attribs->{completion_entry_function} = undef;
return $userInput;
}
####
Cannot do `rl_set' in Term::ReadLine::Gnu at /usr/lib/perl5/site_perl/5.6.1/etrack.pl line 1587
##
##
$attribs->{completion_type} = 33; # '!' in decimal