Lookups: sub-path for dsearch
[exim.git] / src / src / exipick.src
index a631333534af8b82b9cd1d5bd13ec2e35626331a..991128c1db768d705fb14341a6cf42bd097872ed 100644 (file)
@@ -1,5 +1,8 @@
 #!PERL_COMMAND
+
+# Copyright (c) The Exim Maintainers 2023
 # Copyright (c) 1995 - 2018 University of Cambridge.
+# SPDX-License-Identifier: GPL-2.0-or-later
 # See the file NOTICE for conditions of use and distribution.
 
 
@@ -89,7 +92,7 @@ GetOptions(
   'show-tests'  => \$G::show_tests, # display tests as applied to each message
   'man'         => sub { pod2usage(-verbose => 2, -exit => 0, -noperldoc => system('perldoc -V >/dev/null 2>&1')) },
   'help'        => sub { pod2usage(-verbose => 1, -exit => 0) },
-  'version'     => sub {
+  'v|version'     => sub {
         print "$p_name: $0\n",
             "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
             "perl(runtime): $]\n";
@@ -433,10 +436,10 @@ sub get_all_msgs {
     if ($e =~ /^[a-zA-Z0-9]$/) {
       opendir(DD, "$d/$e") || next;
       foreach my $f (grep !/^\./, readdir(DD)) {
-        push(@m, { message => $1, path => "$d/$e" }) if ($f =~ /^(.{16})-H$/);
+        push(@m, { message => $1, path => "$d/$e" }) if ($f =~ /^(.{23}|.{16})-H$/);
       }
       closedir(DD);
-    } elsif ($e =~ /^(.{16})-H$/) {
+    } elsif ($e =~ /^(.{23}|.{16})-H$/) {
       push(@m, { message => $1, path => $d });
     }
   }