paulroub / todo.txt-recurring-tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with Bash in Ubuntu 18.04

jsosulski opened this issue · comments

Hi,

I really like the idea of this addon as setting due dates is not very pleasant in plain todo.txt syntax. Unfortunately, it does not seem to work on my machine. Apparently bash likes to interpret numbers with leading 0s as octal numbers which interferes with dates in August and September as octal cannot represent 08 and 09. As a result the resulting month is 00.

The same happens to days 08 09 (too large for octal representation).

Here is the error output when trying to set the due date to tomorrow on my machine.

$ t setdue +1 39
/my_todo_dir/.todo.actions.d/setdue: line 350: [[: 08: value too great for base (error token is "08")
/my_todo_dir/.todo.actions.d/setdue: line 145: printf: 08: invalid octal number
/my_todo_dir/.todo.actions.d/setdue: line 145: printf: 08: invalid octal number
month-date combination invalid
year 2019 month 08 date 06
/my_todo_dir/.todo.actions.d/setdue: line 145: printf: 08: invalid octal number
monlength 0
/my_todo_dir/.todo.actions.d/setdue: line 362: printf: 08: invalid octal number
setdue: Do you wish to replace this line:
        Test
with this line?
        Test due:2019-00-06
Y/n:

Sorry, wrong repository