Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Completion/Util.pm

    r69c27e6 r94ef58c  
    2424    my $optsdone = 0;
    2525
    26     my %flags_seen;
    27 
    2826    while($idx < $ctx->word) {
    2927        my $word = $ctx->words->[$idx];
     
    3937        } elsif ($word =~ m{^-}) {
    4038            $word = "-" . substr($word, -1);
    41             $flags_seen{$word} = 1; # record flag
    4239            $flag = $word if(exists $args->{$word});
    4340        } else {
     
    6158        return;
    6259    } else {
    63         my @opts = $optsdone ? () : (@$no_args, keys %$args);
    64         # filter out flags we've seen if needbe
    65         @opts = grep {!$flags_seen{$_}} @opts unless $options{repeat_flags};
    66         return (@opts, $default ? ($default->($ctx, $argct)) : ());
     60        return ($optsdone ? () : (@$no_args, keys %$args),
     61                $default ? ($default->($ctx, $argct)) : ());
    6762    }
    6863}
Note: See TracChangeset for help on using the changeset viewer.