aboutsummaryrefslogtreecommitdiff
path: root/src/td.in (follow)
Commit message (Collapse)AuthorAgeFilesLines
* src/td.in: Disable unusable WIP lintingEuAndreh2022-01-191-0/+1
|
* src/td.in: Remove leftover echo commandsEuAndreh2022-01-181-2/+0
|
* src/td.in: separate flag from string option in "head" and "tail" commandsEuAndreh2022-01-181-2/+2
|
* src/td.in: Add optimal_line_for_type()EuAndreh2022-01-181-2/+42
| | | | | | | | | | | | | | | | | Use the new function in insert_at_line(): whenever a given line $N is equal to 0, meaning it doesn't exist yet in the file, the optimal_line_for_type() will scan the file and answer with the "optimal" line number that the the type should be inserted at. It does that by looking at the order in which types apper in $TD_TYPES, and compare that with $TD_FILE: - if a previous type has appeared already, it continues scanning the file until a different level 1 heading appears, or until the end of the file; - if a type that comes after appears, it gets inserted before it; - if no types exist in the file yet, it gets inserted at the end. It fixes #td-05580844-40db-0db6-b11e-9f041a08c0a7.
* First commit, now with a clean historyEuAndreh2022-01-181-0/+540