aboutsummaryrefslogtreecommitdiffstats
path: root/history-search/complete_test.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@cowu.be>2010-07-24 16:35:43 +0000
committerTom Feist <shabble@cowu.be>2010-07-24 16:35:43 +0000
commit501309887a7499b91c2b9fa8f76180c2738d7990 (patch)
tree5bc5f26da277c8b4c7d66c5863ba365723dc6c53 /history-search/complete_test.pl
parentmisc stuffs (diff)
downloadirssi-scripts-501309887a7499b91c2b9fa8f76180c2738d7990.tar.gz
irssi-scripts-501309887a7499b91c2b9fa8f76180c2738d7990.zip
something confusing going on here, have I got nested repos?
Diffstat (limited to 'history-search/complete_test.pl')
-rw-r--r--history-search/complete_test.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/history-search/complete_test.pl b/history-search/complete_test.pl
new file mode 100644
index 0000000..a8ae485
--- /dev/null
+++ b/history-search/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);
+