From 4f17970533cfea1e6e8d0e2f2d63b64b9433ae2b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 17 Sep 2016 06:37:41 -0400 Subject: complete_profile_field: Simplify complist data Just set the array of default profile fields as the complist directly instead of doing the loop/push rigmarole. --- slack_profile.pl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/slack_profile.pl b/slack_profile.pl index fa00ad2..f240b3f 100644 --- a/slack_profile.pl +++ b/slack_profile.pl @@ -172,12 +172,7 @@ sub complete_profile_field { return unless $linestart =~ /^\Q${slash}\Eslack_profile_set\b/i; - my @profile_fields = qw(first_name last_name email phone skype title); - @$complist = (); - - for my $field (@profile_fields) { - push @$complist, $field; - } + @$complist = qw(first_name last_name email phone skype title); Irssi::signal_stop(); } -- cgit v1.2.3