Bug Fix: tasks whose ID begins with '0' ought to be ignored.

*   Fixed regex in `_list` to exclude lines that begin with whitespace,
    as the ' ' => '0' replacement hadn't yet been performed.

*   Added test cases to `t1300-ls.sh` to check for this condition.
This commit is contained in:
Mike West
2009-09-14 21:21:25 +02:00
parent 5a49f4b5d5
commit 5f9fd4c759
2 changed files with 82 additions and 1 deletions

View File

@@ -531,7 +531,7 @@ _list() {
items=$(
sed = "$src" \
| sed "N; s/^/ /; s/ *\(.\{$PADDING,\}\)\n/\1 /" \
| grep -v "^[0-9]\+ *$"
| grep -v "^[ 0-9]\+ *$"
)
if [ "${filter_command}" ]; then
filtered_items=$(echo -ne "$items" | eval ${filter_command})