Tasks with no priority sort before prioritized tasks if they start with ASCII char before '('
Do you want to request a feature or report a bug? bug
What is the current behavior? If you have a task that starts with an ASCII character before '(' (such as # or double quote), that task will sort before any of the priority tasks. So, what you get are:
- unprioritized tasks that start with an ASCII character before '('
- prioritized tasks
- unprioritized tasks that start ASCII character after '('
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Use a todo.txt such as the following:
(A) high priority task
(B) medium priority task
"funny" task
Another task
(A) "funny" priority task
then do todo.sh ls will show:
3 "funny" task
5 (A) "funny" priority task
1 (A) high priority task
2 (B) medium priority task
4 Another task
What is the expected behavior? The expected behavior is that all unprioritized tasks will sort after prioritized tasks.
5 (A) "funny" priority task
1 (A) high priority task
2 (B) medium priority task
3 "funny" task
4 Another task
Which versions todo.sh are you using?
Run
todo.sh -VTODO.TXT Command Line Interface v2.11.0
Which Operating System are you using? MacOS 10.13.6
Which version of bash are you using?
Run
bash --versionGNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
This appears to be because of the LC_COLLATE=C in the default TODOTXT_SORT_COMMAND.
You can try setting this in your todo.cfg to remove it. Seems to ignore non-alphanumeric characters and allow the priority sorting.
TODOTXT_SORT_COMMAND="sort -f -k2"