Add an option to filter by object hash
Implement a new --filter-hash option to filter by object identifiers. Each object having an identifier that has the specified pattern as a prefix is matched. Patterns starting with an exclamation mark (!) are interpreted as negative patterns. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
@@ -407,6 +407,7 @@ enum item_type {
|
||||
/* Filter settings. */
|
||||
struct item_filter {
|
||||
int type_mask;
|
||||
char *hash;
|
||||
regex_t *regex;
|
||||
time_t start_from;
|
||||
time_t start_to;
|
||||
@@ -1120,6 +1121,7 @@ int vasprintf(char **, const char *, va_list);
|
||||
int asprintf(char **, const char *, ...);
|
||||
int starts_with(const char *, const char *);
|
||||
int starts_with_ci(const char *, const char *);
|
||||
int hash_matches(const char *, const char *);
|
||||
|
||||
/* vars.c */
|
||||
extern int col, row;
|
||||
|
||||
Reference in New Issue
Block a user