diff --git a/tools/iperl b/tools/iperl index 74a05f9..210c798 100755 --- a/tools/iperl +++ b/tools/iperl @@ -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!