From eae082a2110ec16d630b1a1d0f76fae3366e9632 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 17 Aug 2014 15:56:28 +0200 Subject: Add shortname to EFA service list --- bin/efa | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/efa b/bin/efa index 33730d9..ee85bf7 100755 --- a/bin/efa +++ b/bin/efa @@ -223,11 +223,10 @@ if ( $opt->{exclude} ) { } if ( $opt->{discover} or $opt->{'auto-url'} ) { - for my $pair ( Travel::Routing::DE::EFA::get_efa_urls() ) { - my ( $url, $name ) = @{$pair}; + for my $service ( Travel::Routing::DE::EFA::get_efa_urls() ) { $efa = eval { Travel::Routing::DE::EFA->new( - efa_url => $url, + efa_url => $service->{url}, origin => [ @from, $from_type ], destination => [ @to, $to_type ], @@ -253,7 +252,11 @@ if ( $opt->{discover} or $opt->{'auto-url'} ) { if ( $opt->{'auto-url'} ) { last; } - printf( "%-55s (%s)\n", $url, $name ); + printf( + "%s / %s (%s)\n -> efa -s %s %s\n\n", + @{$service}{qw(name shortname url shortname)}, + join( ' ', map { "'$_'" } @ARGV ), + ); } } if ( $opt->{'discover'} ) { -- cgit v1.2.3