summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/efa14
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/efa b/bin/efa
index 3f0822c..a5b5403 100755
--- a/bin/efa
+++ b/bin/efa
@@ -205,7 +205,7 @@ GetOptions(
auto-url|discover-and-print|A
bike|b
date|d=s
- depart=s
+ depart|time|t=s
devmode
discover|D
efa-url|u=s
@@ -223,7 +223,6 @@ GetOptions(
prefer|P=s
proximity|p:10
service|s=s
- time|t=s
timeout=i
to=s@{2}
version|v
@@ -241,6 +240,13 @@ if ( $opt->{list} ) {
exit 0;
}
+if ( $opt->{arrive} and $opt->{depart} ) {
+ print STDERR 'Note: The options -a/--arrive and -t/--time/--depart are'
+ . " mutually exclusive\n"
+ . " Discarding the --arrive option\n\n";
+ delete $opt->{arrive};
+}
+
if ( not( @from and @to ) ) {
if ( @ARGV == 4 ) {
( @from[ 0, 1 ], @to[ 0, 1 ] ) = @ARGV;
@@ -304,7 +310,7 @@ if ( $opt->{discover} or $opt->{'auto-url'} ) {
via => ( @via ? [ @via, $via_type ] : undef ),
arrival_time => $opt->{arrive},
- departure_time => $opt->{depart} // $opt->{time},
+ departure_time => $opt->{depart},
date => $opt->{date},
exclude => $opt->{exclude},
train_type => $opt->{include},
@@ -345,7 +351,7 @@ else {
via => ( @via ? [ @via, $via_type ] : undef ),
arrival_time => $opt->{arrive},
- departure_time => $opt->{depart} // $opt->{time},
+ departure_time => $opt->{depart},
date => $opt->{date},
exclude => $opt->{exclude},
train_type => $opt->{include},