From 3789524cb5c0c5b5ba709308eae071d0d79b3598 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 29 Jan 2016 03:43:18 +0100 Subject: [PATCH] run_command: remove unused argument $config --- bin/fcscs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/bin/fcscs b/bin/fcscs index c06db37..c44b8ea 100755 --- a/bin/fcscs +++ b/bin/fcscs @@ -445,7 +445,7 @@ sub get_regex_matches { sub run_command { - my ($screen, $config, $cmd) = @_; + my ($screen, $cmd) = @_; $screen->debug('run_command', "running @{$cmd}"); @@ -885,13 +885,13 @@ sub handler_yank { # GNU screen displays an annoying "Slurping X characters into buffer". # Use 'msgwait 0' as a hack to disable it. my $msgwait = $config->{setting}{screen_msgwait}; - run_command($screen, $config, ['screen', '-X', 'msgwait', 0]); - run_command($screen, $config, ['screen', '-X', 'readbuf', $tmp]); - run_command($screen, $config, ['screen', '-X', 'msgwait', $msgwait]); + run_command($screen, ['screen', '-X', 'msgwait', 0]); + run_command($screen, ['screen', '-X', 'readbuf', $tmp]); + run_command($screen, ['screen', '-X', 'msgwait', $msgwait]); } elsif ($config->{setting}{multiplexer} eq 'tmux') { $screen->debug('handler_yank', 'using tmux'); - run_command($screen, $config, ['tmux', 'load-buffer', $tmp]); + run_command($screen, ['tmux', 'load-buffer', $tmp]); } else { die 'unsupported multiplexer'; } @@ -925,7 +925,7 @@ sub handler_paste { # Sleep until we switch back to the current window. Time::HiRes::usleep($config->{setting}{paste_sleep}); - run_command($screen, $config, \@cmd); + run_command($screen, \@cmd); }); return; } @@ -936,7 +936,7 @@ sub handler_url { run_in_background($screen, sub { my @cmd = ( @{$config->{setting}{browser}}, $match->{value} ); - run_command($screen, $config, \@cmd); + run_command($screen, \@cmd); }); return; } @@ -1219,8 +1219,7 @@ Example: if ($match->{value} =~ m{^https://www.youtube.com/}) { return run_in_background($screen, sub { - run_command($screen, $config, - ['youtube-dl-wrapper', $match->{value}]); + run_command($screen, ['youtube-dl-wrapper', $match->{value}]); }); } handler_url(@_); -- 2.45.2