Skip to content

Commit dc5eedf

Browse files
author
Brady Trainor
committed
Revert "Fix/noeol (todotxt#295)"
This reverts commit 861ad5e.
1 parent e50e4c5 commit dc5eedf

File tree

3 files changed

+0
-123
lines changed

3 files changed

+0
-123
lines changed

tests/t1000-addlist.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,4 @@ TODO: 1 added.
110110
TODO: 1 of 1 tasks shown
111111
EOF
112112

113-
echo -n 'this is a first task without newline' > todo.txt
114-
test_todo_session 'add to file without EOL' <<EOF
115-
>>> todo.sh add "a second task"
116-
2 a second task
117-
TODO: 2 added.
118-
119-
>>> todo.sh list
120-
2 a second task
121-
1 this is a first task without newline
122-
--
123-
TODO: 2 of 2 tasks shown
124-
EOF
125-
126113
test_done

tests/t1850-move.sh

Lines changed: 0 additions & 102 deletions
This file was deleted.

todo.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -488,12 +488,6 @@ replaceOrPrepend()
488488
fi
489489
}
490490

491-
fixMissingEndOfLine()
492-
{
493-
# Parameters: $1: todo file; empty means $TODO_FILE.
494-
sed -i.bak -e '$a\' "${1:-$TODO_FILE}"
495-
}
496-
497491
uppercasePriority()
498492
{
499493
# Precondition: $input contains task text for which to uppercase priority.
@@ -815,7 +809,6 @@ _addto() {
815809
input=$(echo -n "($TODOTXT_PRIORITY_ON_ADD) " ; echo "$input")
816810
fi
817811
fi
818-
fixMissingEndOfLine "$file"
819812
echo "$input" >> "$file"
820813
if [ "$TODOTXT_VERBOSE" -gt 0 ]; then
821814
TASKNUM=$(sed -n '$ =' "$file")
@@ -1355,7 +1348,6 @@ case $action in
13551348
# leave blank line behind (preserves line numbers)
13561349
sed -i.bak -e "${item}s/^.*//" "$src"
13571350
fi
1358-
fixMissingEndOfLine "$dest"
13591351
echo "$todo" >> "$dest"
13601352

13611353
if [ "$TODOTXT_VERBOSE" -gt 0 ]; then

0 commit comments

Comments
 (0)