From 91f126ae4c9ea90336bdeb24001fadca79439edc Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sat, 24 Jul 2010 18:23:13 +0100 Subject: moved most tests to feature-tests/ --- feature-tests/complete_test.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 feature-tests/complete_test.pl (limited to 'feature-tests/complete_test.pl') diff --git a/feature-tests/complete_test.pl b/feature-tests/complete_test.pl new file mode 100644 index 0000000..a8ae485 --- /dev/null +++ b/feature-tests/complete_test.pl @@ -0,0 +1,27 @@ +use strict; +use vars qw($VERSION %IRSSI); + +use Irssi; +$VERSION = '2.1'; +%IRSSI = ( + authors => 'Daenyth', + contact => 'Daenyth /at/ gmail /dot/ com', + name => 'Complete Last-Spoke', + description => 'When using tab completion on an empty input buffer, complete to the nick of the person who spoke most recently.', + license => 'GPL2', +); + +sub do_complete { + my ($strings, $window, $word, $linestart, $want_space) = @_; + return unless ($linestart eq '' && $word eq ''); + +# my $suffix = Irssi::settings_get_str('completion_char'); +# @$strings = $last_speaker . $suffix; + push @$strings, qw|/foo /bar /baz /bacon|; + +# $$want_space = 1; +# Irssi::signal_stop(); +} + + Irssi::signal_add_first( 'complete word', \&do_complete); + -- cgit v1.2.3