summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-08-17 15:56:28 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-08-17 15:56:28 +0200
commiteae082a2110ec16d630b1a1d0f76fae3366e9632 (patch)
treefe7aef0a5e5abf601471162f51f0add10a18c5ec /bin
parent430eda59e8739d195c79a7b42d5c1fd3a545d46c (diff)
Add shortname to EFA service list
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa11
1 files changed, 7 insertions, 4 deletions
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'} ) {