mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Feature #158
- Added feature #158, regular expression support for filters and substitutions. - Added unit tests to att.t and filter.t. - Updated docs.
This commit is contained in:
parent
09ce815fc5
commit
fe65d28f99
10 changed files with 392 additions and 72 deletions
|
@ -315,6 +315,26 @@ non-exact match:
|
|||
|
||||
This will remove the second annotation - the first non-exact match.
|
||||
|
||||
.TP
|
||||
.B Q: Does task support searching using regular expressions?
|
||||
Yes, taskwarrior supports IEEE Std 1003.2 (POSIX.2) regular expressions, but not
|
||||
by default. You must enable this feature with the following command:
|
||||
|
||||
$ task config regex on
|
||||
|
||||
Once enabled, all searches are considered regular expressions, for example:
|
||||
|
||||
$ task list ^the
|
||||
|
||||
will list all tasks whose description or annotations start with "the".
|
||||
Substitutions also support regular expressions:
|
||||
|
||||
$ task 1 /^the/The/
|
||||
|
||||
Note that regular expressions work in conjunction with the
|
||||
.B search.case.sensitive
|
||||
configuration setting.
|
||||
|
||||
.TP
|
||||
.B Q: How can I help?
|
||||
There are lots of ways. Here are some:
|
||||
|
|
|
@ -255,6 +255,18 @@ names you have used, or just the ones used in active tasks. The default value i
|
|||
May be yes or no, and determines whether keyword lookup and substitutions on the
|
||||
description and annotations are done in a case sensitive way. Defaults to yes.
|
||||
|
||||
.TP
|
||||
.B regex=on
|
||||
Enables regular expression searches in filters (task list ^Fix), and
|
||||
substitutions (task <id> /^the/The/).
|
||||
|
||||
Note that this feature works in conjunction with the
|
||||
.B search.case.sensitive
|
||||
setting.
|
||||
|
||||
The default value is off, because this advanced feature could cause confusion
|
||||
among users that are not comfortable with regular expressions.
|
||||
|
||||
.TP
|
||||
.B _forcecolor=no
|
||||
Taskwarrior shuts off color automatically when the output is not sent directly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue