diff --git a/tests/t1320-listproj.sh b/tests/t1320-listproj.sh index 6037511..5f2f6fe 100755 --- a/tests/t1320-listproj.sh +++ b/tests/t1320-listproj.sh @@ -114,4 +114,9 @@ test_todo_session 'listproj from combined open + done tasks' <<'EOF' +prj01 EOF +test_todo_session 'listproj with GREP_OPTIONS disruption' <<'EOF' +>>> GREP_OPTIONS=-n todo.sh listproj ++prj01 +EOF + test_done diff --git a/todo.sh b/todo.sh index 7e75ceb..25078fb 100755 --- a/todo.sh +++ b/todo.sh @@ -467,6 +467,9 @@ OVR_TODOTXT_DEFAULT_ACTION="$TODOTXT_DEFAULT_ACTION" OVR_TODOTXT_SORT_COMMAND="$TODOTXT_SORT_COMMAND" OVR_TODOTXT_FINAL_FILTER="$TODOTXT_FINAL_FILTER" +# Prevent GREP_OPTIONS from malforming grep's output +GREP_OPTIONS="" + # == PROCESS OPTIONS == while getopts ":fhpcnNaAtTvVx+@Pd:" Option do