1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

common: Add a flag for left anchored substring match to recsel.

* common/recsel.c (struct recsel_expr_s): Add field lefta.
(recsel_parse_expr): Parse it.
(recsel_select): Implement selection.
--

This flags makes it for example easy to select keys last updated from
an ldap server:

  gpg --list-filter 'select=origin=ks && -^ url =~ ldap' \
       -k --with-key-origin
This commit is contained in:
Werner Koch 2025-03-12 11:09:52 +01:00
parent e5555a40e6
commit c12b7d047e
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 38 additions and 6 deletions

View file

@ -2561,8 +2561,8 @@ gpg can track the origin of a key. Certain origins are implicitly
known (e.g., keyserver, web key directory) and set. For a standard
import the origin of the keys imported can be set with this option.
To list the possible values use "help" for @var{string}. Some origins
can store an optional @var{url} argument. That URL can appended to
@var{string} after a comma.
can store an optional @var{url} argument; such an URL can be appended to
@var{string} delimited by a comma.
@item --import-options @var{parameters}
@opindex import-options
@ -4389,6 +4389,8 @@ are:
@table @asis
@item --
@var{VALUE} spans to the end of the expression.
@item -^
The substring match is left anchored.
@item -c
The string match in this part is done case-sensitive.
@item -t