summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-09-28 18:06:25 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-09-28 18:06:25 +0200
commit53fcd15fe7667628f4d5c4f2c1b2dc49f174d67c (patch)
treea90b3a2f16b3b628bcf0488ed985736546b868bd /bin
parent14055f3ecdeaada8f0e871f5943417bc236738a9 (diff)
EFA: Handle ambiguous input properly (explicit accessors for candidate lists)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa-m10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/efa-m b/bin/efa-m
index 5e2c68d..28fd2ad 100755
--- a/bin/efa-m
+++ b/bin/efa-m
@@ -338,6 +338,16 @@ $efa = new_efa_by_url($efa_url);
if ( my $err = $efa->errstr ) {
say STDERR "Request error: ${err}";
+
+ if ( $efa->place_candidates ) {
+ say 'You might want to try one of the following places:';
+ say join( "\n", $efa->place_candidates );
+ }
+ elsif ( $efa->name_candidates ) {
+ say 'You might want to try one of the following names:';
+ say join( "\n", $efa->name_candidates );
+ }
+
exit 2;
}