Skip to content

Wildcard matching with "todo.sh list" #334

Answered by inkarkat
richmintz1 asked this question in Q&A
Discussion options

You must be logged in to vote

This is because the wildcard matching... is in fact regular expression matching, so +1-NW* is (as a basic regexp for grep) matching the literal +1-N followed by 0 or more W characters (which +1-NRR fulfills).

Matching is done case-insensitive with grep; the only specialty added is that a leading dash inverts the matching (i.e. grep -v); here's the line in the code.

Unfortunately, the todo.sh help list is very vague in that regard; it just speaks of term(s); the only hint that basic regular expressions are used is in the fact that logical or is achieved via \|. I've just submitted #335 to improve that.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by karbassi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants