- Timestamp:
- Jul 29, 2009, 9:41:44 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 4fbc7f5
- Parents:
- 2b37be2
- git-author:
- Nelson Elhage <nelhage@mit.edu> (07/29/09 21:22:25)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (07/29/09 21:41:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Completion/Util.pm
r82a6e8b re711ca7 19 19 my $flag = undef; 20 20 21 my $word = 0; 22 my $optsdone = 0; 23 21 24 while($idx < $ctx->word) { 22 25 my $word = $ctx->words->[$idx]; 23 BarnOwl::debug("[completing] idx=$idx word=$word ctx->word=@{[$ctx->word]}");24 26 if($flag) { 25 27 undef $flag; 26 28 } elsif($word =~ m{^--}) { 27 last if $word eq '--'; 29 if($word eq '--') { 30 $optsdone = 1; 31 last; 32 } 28 33 $flag = $word if(exists $args->{$word}); 29 34 } elsif ($word =~ m{^-}) { … … 35 40 36 41 if($flag) { 37 BarnOwl::debug("END: flag=$flag");38 42 my $c = $args->{$flag}; 39 43 if($c) { … … 42 46 return; 43 47 } else { 44 return (@$no_args, 45 keys %$args, 48 return ($optsdone ? () : (@$no_args, keys %$args), 46 49 $default ? ($default->($ctx)) : ()); 47 50 }
Note: See TracChangeset
for help on using the changeset viewer.