Skip to content

Commit

Permalink
Sort the output on filename by default to preserve order
Browse files Browse the repository at this point in the history
The sorting only takes a few microseconds.
  • Loading branch information
patrick.joerg committed Nov 14, 2024
1 parent 36414f7 commit 0d0f303
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ but not optional.
- [x] Support - [o] for half done indented lists and make them optional
- [x] Give a "works from nu version > on"
- [x] Or make a nvim plugin, that gets the todos into a telescope fzf list
- [x] Create a Link directly to the file and open it in $EDITOR
- [ ] Unify context, project and exclude filters
- [ ] Add some tests from http://www.nushell.sh/book/testing.html
- [ ] Make searchpath a list for multiple todo sources
- [ ] Get the context and project filters into the retrospective
- [ ] Get the list feature into the retrospective as well
- [ ] Create a Link directly to the file and open it in $EDITOR
like: nvim +call cursor(<LINE>, <COLUMN>) for calling it directly on the line
- [ ] Due dates functionality @maybe
- [ ] Add a config for depth to show only unindented items per default
Expand Down
6 changes: 2 additions & 4 deletions tn.nu
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export def td [
let filter = (get_list_filter $all $done $config.PARTIAL)

if $version {
let version = "0.0.9"
let version = "0.1.0"
$version
} else if $generate_todos {
let td = generate_todos $config.TODO_FILE_PATH $config.EXCLUDEDIR $filter $project $context $config.LOGFILE
let td_filtered = filter_excluded_contexts $exclude $td
let td_filtered = (filter_excluded_contexts $exclude $td | sort-by -i file)
if $blame {
let td_blamed_filtered = add_blame_info $td_filtered $config.TODO_FILE_PATH $config.LOGFILE
if $rand { randomize $td_blamed_filtered } else {$td_blamed_filtered}
Expand Down Expand Up @@ -207,8 +207,6 @@ def get_retrospective [time: string, path: string, regex: string] {
}

# Open the file of the line specified with an editor.
# It works, but the table td produces is not persistent, so there is no workflow like
# looking up todos and then open the line in the editor.
export def otd [table: table, item_number: int] {
let config = (load_config)
let item = ($table | get $item_number)
Expand Down

0 comments on commit 0d0f303

Please sign in to comment.