59 |
$self->fix_inputline; |
$self->fix_inputline; |
60 |
} ]; |
} ]; |
61 |
|
|
62 |
my $state = 'CPE'; |
$sh->prompt( '> ' ); |
|
|
|
|
$sh->prompt( $state . '> ' ); |
|
63 |
|
|
64 |
while (1) { |
while (1) { |
65 |
$sh->do_one_loop(); |
$sh->do_one_loop(); |
72 |
|
|
73 |
my @matches; |
my @matches; |
74 |
|
|
75 |
if ( $state eq 'CPE' ) { |
# do we have list (part) of CPE? |
76 |
|
if ( $line =~ /^(\w+)\s*$/ ) { |
77 |
@matches = sort grep { /^\Q$curword\E/ } $store->known_CPE; |
@matches = sort grep { /^\Q$curword\E/ } $store->known_CPE; |
78 |
$sh->out( "CPE available: ", join(",", @matches ) ); |
$sh->out( "CPE available: ", join(",", @matches ) ); |
79 |
} |
} elsif ( $line =~ |
80 |
|
|
81 |
return @matches; |
return @matches; |
82 |
} |
} |