summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--man/mpick.12
-rw-r--r--mpick.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/man/mpick.1 b/man/mpick.1
index 2ac7911..cbf2ad1 100644
--- a/man/mpick.1
+++ b/man/mpick.1
@@ -101,7 +101,7 @@ tests are given by the following EBNF:
 
 <timeprop> ::= atime | ctime | mtime | date
 
-<numprop>  ::= depth | replies | index | size | total
+<numprop>  ::= depth | kept | replies | index | size | total
 
 <numop>    ::= <= | < | >= | > | == | = | !=
 
diff --git a/mpick.c b/mpick.c
index ba70951..25c797e 100644
--- a/mpick.c
+++ b/mpick.c
@@ -60,6 +60,7 @@ enum prop {
 	PROP_ATIME = 1,
 	PROP_CTIME,
 	PROP_DEPTH,
+	PROP_KEPT,
 	PROP_MTIME,
 	PROP_PATH,
 	PROP_REPLIES,
@@ -460,6 +461,8 @@ parse_cmp()
 
 	if (token("depth"))
 		prop = PROP_DEPTH;
+	else if (token("kept"))
+		prop = PROP_KEPT;
 	else if (token("index"))
 		prop = PROP_INDEX;
 	else if (token("replies")) {
@@ -827,6 +830,7 @@ eval(struct expr *e, struct mailinfo *m)
 		case PROP_ATIME: v = m->sb->st_atime; break;
 		case PROP_CTIME: v = m->sb->st_ctime; break;
 		case PROP_MTIME: v = m->sb->st_mtime; break;
+		case PROP_KEPT: v = kept; break;
 		case PROP_REPLIES: v = m->replies; break;
 		case PROP_SIZE: v = m->sb->st_size; break;
 		case PROP_DATE: v = msg_date(m); break;