Skip to content

Sorting of output? #331

Answered by inkarkat
richmintz1 asked this question in Q&A
Feb 11, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

TODOTXT_SORT_COMMAND is mentioned in the default todo.cfg. This is a Bash command-line (a command or a pipeline of commands that typically includes the sort command) thats gets the (somewhat preprocessed) tasks via standard input, reorders the lines, and then hands them back via standard output to the colorization stage inside todo.sh.

Due dates are typically set via a t:<date> or due:<date> marker. As these can occur anywhere in the task text, sorting based on the date is a bit difficult. The usual approach is

  1. extracting the due date and duplicating it to the beginning of each line (using a default date for tasks that don't have a due date; that default value determines whether non-due …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@richmintz1
Comment options

@AvanBerne
Comment options

Answer selected by richmintz1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants