TOOLS/zsh.pl: untabify

This commit is contained in:
Philip Sequeira 2014-06-29 17:24:27 -04:00 committed by Alessandro Ghedini
parent 7450a7f531
commit e940afec15
1 changed files with 26 additions and 26 deletions

View File

@ -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;
}