From 7b91d41c66a0f5cdc43f8cc57efed4dcdd346f6c Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sat, 7 Jan 2012 22:42:56 +0100 Subject: [PATCH] Add hint for OR'ing TERMs to help text for ls/list. The regexp syntax and quoting rules aren't known to many who are not well versed in the Bash shell, and difficult to get right even for people in the know. This question came up just recently on the mailing list, too. --- todo.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/todo.sh b/todo.sh index f367f40..1251d65 100755 --- a/todo.sh +++ b/todo.sh @@ -199,7 +199,10 @@ help() list [TERM...] ls [TERM...] Displays all tasks that contain TERM(s) sorted by priority with line - numbers. If no TERM specified, lists entire todo.txt. + numbers. Each task must match all TERMs (logical AND); to display + tasks that contain any TERM (logical OR), use + "TERM1\|TERM2\|..." (with quotes), or TERM1\\\|TERM2 (unquoted). + If no TERM specified, lists entire todo.txt. listall [TERM...] lsa [TERM...]