my $term = new Term::ReadLine 'Command Line Interface'; my $attribs = $term->Attribs; $attribs->{completion_entry_function} = $attribs->{'list_completion_function'}; $attribs->{completion_word} = \@commands; # array of supported commands