]> ruderich.org/simon Gitweb - fcscs/fcscs.git/commitdiff
run_command: remove unused argument $config
authorSimon Ruderich <simon@ruderich.org>
Fri, 29 Jan 2016 02:43:18 +0000 (03:43 +0100)
committerSimon Ruderich <simon@ruderich.org>
Fri, 29 Jan 2016 02:43:18 +0000 (03:43 +0100)
bin/fcscs

index c06db37987e69e80cccb9d8c706eb4993a81a783..c44b8eaeb623c53846ee2b8f8c22931acc56e17f 100755 (executable)
--- 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(@_);