]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
midichannels.pl: support indented commands
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 22 Mar 2018 00:45:31 +0000 (17:45 -0700)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 22 Mar 2018 00:45:53 +0000 (17:45 -0700)
misc/tools/midichannels.pl

index 4f47b9fdc521165157f239280b3cbaadec54ed02..0223e82a3a5c39ac0046d98706746e47fefbc45c 100755 (executable)
@@ -60,7 +60,7 @@ for(@others)
 while(<STDIN>)
 {
        chomp;
-       my @arg = split /\s+/, $_;
+       my @arg = grep { $_ ne '' } split /\s+/, $_;
        my $cmd = shift @arg;
        print "Executing: $cmd @arg\n";
        if($cmd eq '#')