Revision 1765abe6
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
scripts/rose_auto_create_model.pl | ||
---|---|---|
184 | 184 |
help => sub { pod2usage(verbose => 99, sections => 'NAME|SYNOPSIS|OPTIONS') }, |
185 | 185 |
quiet => \ my $quiet, |
186 | 186 |
diff => \ my $diff, |
187 |
'color!' => \ my $color, |
|
187 | 188 |
); |
188 | 189 |
|
189 | 190 |
$options->{client} = $client; |
190 | 191 |
$options->{all} = $all; |
191 | 192 |
$options->{nocommit} = $nocommit; |
192 | 193 |
$options->{quiet} = $quiet; |
194 |
$options->{color} = defined $color ? $color : 1; |
|
193 | 195 |
|
194 | 196 |
if ($diff) { |
195 | 197 |
if (eval { require Text::Diff; 1 }) { |
... | ... | |
210 | 212 |
|
211 | 213 |
Text::Diff::diff($text_a, $text_b, { OUTPUT => sub { |
212 | 214 |
for (split /\n/, $_[0]) { |
213 |
print colored($_, $colors{substr($_, 0, 1)}), $/; |
|
215 |
if ($config{color}) { |
|
216 |
print colored($_, $colors{substr($_, 0, 1)}), $/; |
|
217 |
} else { |
|
218 |
print $_, $/; |
|
219 |
} |
|
214 | 220 |
} |
215 | 221 |
}}); |
216 | 222 |
} |
Auch abrufbar als: Unified diff
nocolor ooption für rose_auto_create_model