- Timestamp:
- Jul 28, 2009, 11:39:29 PM (16 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:
- 2b37be2
- Parents:
- c4efb46 (diff), d4ecc78 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- perl/lib/BarnOwl
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Complete/Zephyr.pm
r8f16dcd r84db778 30 30 } 31 31 32 sub complete_sub {33 my $ctx = shift;34 return complete_flags($ctx,35 [],36 {37 "-r" => \&complete_realm,38 });39 }40 41 32 sub on_message { 42 33 my $m = shift; … … 50 41 BarnOwl::Completion::register_completer(zcrypt => \&complete_zwrite); 51 42 52 # TODO: Handle aliases transparently in the core completion code?53 BarnOwl::Completion::register_completer(sub => \&complete_sub);54 BarnOwl::Completion::register_completer(subscribe => \&complete_sub);55 56 43 $BarnOwl::Hooks::newMessage->add("BarnOwl::Complete::Zephyr::on_message"); 57 44 -
perl/lib/BarnOwl/Completion.pm
rf987504 rc4efb46 18 18 point_move replace_region); 19 19 20 use List::Util qw(m axfirst);20 use List::Util qw(min first); 21 21 22 22 our %completers = (); … … 76 76 sub common_prefix { 77 77 my @words = @_; 78 my $len = m ax(map {length($_)} @words);78 my $len = min(map {length($_)} @words); 79 79 my $pfx = ''; 80 80 for my $i (1..$len) {
Note: See TracChangeset
for help on using the changeset viewer.