--- Completion.pm.orig Sat Feb 23 18:39:15 2013 +++ Completion.pm Mon Feb 13 15:06:00 2023 @@ -179,19 +179,24 @@ # (TAB) attempt completion $_ =~ $this->{tab} && do { + last GETC if grep /^$return$/, $this->get_choices($return); if($tab_pressed++) { - $this->show_choices($return); - redo LOOP; +# $this->show_choices($return); +# redo LOOP; } my @match = $this->get_choices($return); if (@match == 0) { + $this->show_choices($return); + redo LOOP; # sound bell if there is no match - $this->bell(); +# $this->bell(); } else { my $l = length(my $test = shift(@match)); if(@match) { + $this->show_choices($return); + redo LOOP; # sound bell if multiple choices - $this->bell(); +# $this->bell(); } elsif($this->{delim}) { $test .= $this->{delim}; @@ -361,7 +366,7 @@ { my __PACKAGE__ $this = shift; my $return = shift; - unless($this->{validate}) { + unless($this->{validation}) { return $return; } elsif(ref $this->{validate}) { @@ -376,7 +381,7 @@ } # we may have several validation options - my @vals = split(/[\s,]+/, $this->{validate}); + my @vals = split(/[\s,]+/, $this->{validation}); VALIDATE_OPTIONS: foreach my $val (@vals) {