Skip to content

Commit

Permalink
Revert "Fix/noeol (todotxt#295)"
Browse files Browse the repository at this point in the history
This reverts commit 861ad5e.
  • Loading branch information
Brady Trainor committed Nov 1, 2022
1 parent e50e4c5 commit dc5eedf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 123 deletions.
13 changes: 0 additions & 13 deletions tests/t1000-addlist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,4 @@ TODO: 1 added.
TODO: 1 of 1 tasks shown
EOF

echo -n 'this is a first task without newline' > todo.txt
test_todo_session 'add to file without EOL' <<EOF
>>> todo.sh add "a second task"
2 a second task
TODO: 2 added.
>>> todo.sh list
2 a second task
1 this is a first task without newline
--
TODO: 2 of 2 tasks shown
EOF

test_done
Expand Down
102 changes: 0 additions & 102 deletions tests/t1850-move.sh

This file was deleted.

8 changes: 0 additions & 8 deletions todo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,6 @@ replaceOrPrepend()
fi
}

fixMissingEndOfLine()
{
# Parameters: $1: todo file; empty means $TODO_FILE.
sed -i.bak -e '$a\' "${1:-$TODO_FILE}"
}

uppercasePriority()
{
# Precondition: $input contains task text for which to uppercase priority.
Expand Down Expand Up @@ -815,7 +809,6 @@ _addto() {
input=$(echo -n "($TODOTXT_PRIORITY_ON_ADD) " ; echo "$input")
fi
fi
fixMissingEndOfLine "$file"
echo "$input" >> "$file"
if [ "$TODOTXT_VERBOSE" -gt 0 ]; then
TASKNUM=$(sed -n '$ =' "$file")
Expand Down Expand Up @@ -1355,7 +1348,6 @@ case $action in
# leave blank line behind (preserves line numbers)
sed -i.bak -e "${item}s/^.*//" "$src"
fi
fixMissingEndOfLine "$dest"
echo "$todo" >> "$dest"

if [ "$TODOTXT_VERBOSE" -gt 0 ]; then
Expand Down

0 comments on commit dc5eedf

Please sign in to comment.