Permalink
Browse files

Bug Fix: Boundary issues on our search terms

  * Without the addition of the \b word boundary, we can pick up test and test1 in the test
    project search.
  • Loading branch information...
1 parent ee2f804 commit 04301fd2222bfc812518f4134958faa492b48571 @the1ts the1ts committed Oct 18, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 view
View
4 view 100644 → 100755
@@ -56,7 +56,7 @@ function project_view() {
# For each project show header and the list of todo items
for project in $PROJECTS; do
# Use core _list function, does numbering and colouring for us
- PROJECT_LIST=$(_list "$TODO_FILE" "+$project" "$term" | sed 's/\(^+\|\ *+\)[a-zA-Z0-9\{._\-\}]*\ */ /g')
+ PROJECT_LIST=$(_list "$TODO_FILE" "+$project\b" "$term" | sed 's/\(^+\|\ *+\)[a-zA-Z0-9\{._\-\}]*\ */ /g')
if [[ -n "${PROJECT_LIST}" ]]; then
echo "--- $project ---"
echo "${PROJECT_LIST}"
@@ -83,7 +83,7 @@ function context_view() {
# For each context show header and the list of todo items
for context in $CONTEXTS ; do
# Use core _list function, does numbering and colouring for us
- CONTEXT_LIST=$(_list "$TODO_FILE" "@$context" "$term" | sed 's/\(^@\|\ *@\)[^ ]*\ */ /g')
+ CONTEXT_LIST=$(_list "$TODO_FILE" "@$context\b" "$term" | sed 's/\(^@\|\ *@\)[^ ]*\ */ /g')
if [[ -n "${CONTEXT_LIST}" ]]; then
echo "--- $context ---"
echo "${CONTEXT_LIST}"

0 comments on commit 04301fd

Please sign in to comment.