From ec9613e19ed400fffe7913d96ea8a9dda9e33406 Mon Sep 17 00:00:00 2001 From: Jon Knapp Date: Fri, 1 Feb 2013 11:03:24 -0800 Subject: [PATCH 1/2] ensure GREP_OPTIONS doesn't break listproj output --- todo.sh | 3 +++ 1 file changed, 3 insertions(+) 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 From 629a301d436f4afdcaed33301733235e736b0e43 Mon Sep 17 00:00:00 2001 From: Jon Knapp Date: Sat, 2 Feb 2013 16:15:29 -0800 Subject: [PATCH 2/2] Added test case for GREP_OPTIONS --- tests/t1320-listproj.sh | 5 +++++ 1 file changed, 5 insertions(+) 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