summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/hafas12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/hafas b/bin/hafas
index d5f0612..dad10d3 100755
--- a/bin/hafas
+++ b/bin/hafas
@@ -156,10 +156,14 @@ sub parse_mot_options {
my $desc = Travel::Routing::DE::HAFAS::get_service($service);
if ($desc) {
my @mots = @{ $desc->{productbits} };
- @mots = grep { $_ ne 'x' } @mots;
- @mots = uniq @mots;
- @mots = sort @mots;
- say join( "\n", @mots );
+ for my $mot ( @{ $desc->{productbits} } ) {
+ if ( ref($mot) eq 'ARRAY' ) {
+ printf( "%-10s %s\n", @{$mot} );
+ }
+ else {
+ say $mot;
+ }
+ }
exit 0;
}
else {