From 743a03b3b060fbff8579503647a01722fb634cb1 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Mon, 15 Nov 2021 10:20:20 +0000 Subject: [PATCH] don't fork sh/dx on simple query If the query does not contain an "expression" (or even just a callsign and is garanteed to be satified by the cache - if it is enabled - then do not fork / run as a sub command. So 'sh/dx', 'sh/mydx' with or without a count will be run from the cache - if it is enabled. --- cmd/show/dx.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/show/dx.pl b/cmd/show/dx.pl index 7e4d3a35..bad8ffde 100644 --- a/cmd/show/dx.pl +++ b/cmd/show/dx.pl @@ -162,7 +162,7 @@ sub handle # now do the search - if ($self->{_nospawn}) { + if ($self->{_nospawn} || ($Spot::spotcachedays && !$expr && $from == 0 && $fromday == 0 && $today == 0)) { my @res = Spot::search($expr, $fromday, $today, $from, $to, $user, $dofilter, $self); my $ref; my @dx; -- 2.43.0