| 1 | package Reply::Plugin::Autocomplete::Commands; | ||||||||||
| 2 | 1 | our $AUTHORITY = 'cpan:DOY'; | |||||||||
| 3 | 1 | $Reply::Plugin::Autocomplete::Commands::VERSION = '0.42'; | |||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | # ABSTRACT: tab completion for reply commands | ||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use base 'Reply::Plugin'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | sub tab_handler { | ||||||||
|
Subroutine
tab_handler: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 12 | 0 | my $self = shift; | |||||||||
| 13 | 0 | my ($line) = @_; | |||||||||
| 14 | |||||||||||
| 15 | 0 | my ($prefix) = $line =~ /^#(.*)/; | |||||||||
| 16 | 0 | ▶ | return unless defined $prefix; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | |||||||||||
| 18 | 0 | my @commands = $self->publish('commands'); | |||||||||
| 19 | |||||||||||
| 20 | 0 | return map { "#$_" } sort grep { index($_, $prefix) == 0 } @commands; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 1 | 1; | |||||||||
| 24 | |||||||||||
| 25 | __END__ | ||||||||||