branch : pmacs2
This commit is contained in:
moculus 2008-05-18 19:01:39 +00:00
parent 3a93d0145d
commit 277a12111d
1 changed files with 12 additions and 0 deletions

View File

@ -279,6 +279,18 @@ sub main {
$attribs->{special_prefixes} = '$@%*&';
$attribs->{completion_function} = \&complete;
$attribs->{completion_append_character} = '';
my $func = sub {
my ($count, $key) = @_;
print STDERR "\n$count $key\n";
my $line = substr($term->{line_buffer}, 0, $term->{point});
if($line =~ m/^[ \t]*$/) {
$term->insert_text("\t");
} else {
$term->call_function('complete', $count, $key);
#XYZ this is not the "normal" completion handler
}
};
#$term->add_defun("erik-func", $func, ord("\t"));
}
# the mighty read-exec-print loop!