diff --git a/TOOLS/zsh.pl b/TOOLS/zsh.pl index 7edd782c00..03d8bda6bd 100755 --- a/TOOLS/zsh.pl +++ b/TOOLS/zsh.pl @@ -98,40 +98,40 @@ EOS print $tmpl; sub parse_opts { - my ($cmd, $regex, $parsing_main_options) = @_; + my ($cmd, $regex, $parsing_main_options) = @_; - my @list; - my @lines = split /\n/, `$cmd`; + my @list; + my @lines = split /\n/, `$cmd`; - foreach my $line (@lines) { - if ($line !~ /^$regex/) { - next; - } + foreach my $line (@lines) { + if ($line !~ /^$regex/) { + next; + } - my $entry = $1; + my $entry = $1; - if ($parsing_main_options) { - $entry .= '=-'; - } + if ($parsing_main_options) { + $entry .= '=-'; + } - if (defined $2) { - my $desc = $2; - $desc =~ s/\:/\\:/g; + if (defined $2) { + my $desc = $2; + $desc =~ s/\:/\\:/g; - $entry .= ':' . $desc; - } + $entry .= ':' . $desc; + } - if ($parsing_main_options) { - $entry .= ':'; + if ($parsing_main_options) { + $entry .= ':'; - $entry .= '->ao' if ($1 eq '--ao'); - $entry .= '->vo' if ($1 eq '--vo'); - $entry .= '->af' if ($1 eq '--af'); - $entry .= '->vf' if ($1 eq '--vf'); - } + $entry .= '->ao' if ($1 eq '--ao'); + $entry .= '->vo' if ($1 eq '--vo'); + $entry .= '->af' if ($1 eq '--af'); + $entry .= '->vf' if ($1 eq '--vf'); + } - push @list, $entry - } + push @list, $entry + } - return @list; + return @list; }