summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-05-19 21:24:36 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-05-19 21:24:36 +0200
commit0fd9e8a907d79c82d58dd34d031db20462aed115 (patch)
tree006a1a05ba5f23a68a533fde58312f24bb0b6ef5
parent065e00fd680ca9bedf533fa09ace5dda7b59b5e9 (diff)
efa: Added --max-change (maximum number of interchanges)
-rwxr-xr-xbin/efa10
-rw-r--r--provides/zsh/completions/_efa1
2 files changed, 11 insertions, 0 deletions
diff --git a/bin/efa b/bin/efa
index 3f512a2..db89e54 100755
--- a/bin/efa
+++ b/bin/efa
@@ -21,6 +21,7 @@ my $cons;
my (@from, @to, @via);
my ($time, $time_depart, $time_arrive);
my $date;
+my $maxinter;
my $restrict;
my $prefer;
my $proximity;
@@ -120,6 +121,7 @@ GetOptions(
'from=s{2}' => \@from,
'help' => sub {exec('perldoc', $0)},
'ignore-info=s' => \$ignore_info,
+ 'max-change=i' => \$maxinter,
'post=s' => \%post,
'prefer=s' => \$prefer,
'proximity' => \$proximity,
@@ -163,6 +165,10 @@ if ($date) {
@post{'itdDateDay','itdDateMonth','itdDateYear'} = split(/\./, $date);
}
+if (defined($maxinter)) {
+ $post{maxChanges} = $maxinter;
+}
+
if ($prefer) {
given($prefer) {
when('speed') { $post{routeType} = 'LEASTTIME' }
@@ -286,6 +292,10 @@ Journey end time (overrides --time/--depart)
Journey date
+=item B<--max-change> I<number>
+
+Print connections with at most I<number> interchanges
+
=item B<--prefer> I<type>
Prefer connections of I<type>:
diff --git a/provides/zsh/completions/_efa b/provides/zsh/completions/_efa
index da1ce0b..92f3bad 100644
--- a/provides/zsh/completions/_efa
+++ b/provides/zsh/completions/_efa
@@ -10,6 +10,7 @@ arguments=(
'(--depart --time)--arrive:time'
'(--arrive --time)--depart:time'
'--date:date'
+ '--max-change:number'
'--prefer:type:(speed nowait nowalk)'
'--proximity'
'--restrict:type:(local ic ice)'