vonshednob / pter

Manage your todo.txt in a commandline user interface (TUI)
https://vonshednob.cc/pter/
MIT License
102 stars 6 forks source link

Add file name completion when searching #62

Closed andrei-a-papou closed 5 months ago

andrei-a-papou commented 5 months ago

When using multiple todo files, pter can already filter todos by using file: in the search bar. It would be nice if typing file: would show the completion dropdown -- so the user wouldn't have to remember the exact file name.

vonshednob commented 5 months ago

Not a bad idea either! Although I don't think you have to provide the exact filename? Just any distinctive part should work? Like, if one file is at documents/project1/todo.txt and another is at shared/work.txt, you should be able to find all issues from the todo.txt by searching for file:pro

andrei-a-papou commented 5 months ago

You're right, partial matches work! It's no big deal for me with two distinctively named files, but with more files I think it'd be helpful to make things more explicit.

And by the way, I love the fact that pter can seamlessly work with multiple files. It was a fantastic idea. I've used several todo.txt apps in the past and they all can either handle one file at a time or use something like tabs, which is often awkward.

andrei-a-papou commented 5 months ago

Oh, this seems easy to do: 80-filename-completion.diff.gz

vonshednob commented 5 months ago

Wasn't there something about a feature freeze for version 3.16? But then again life happened and I had not have a lot of time to implement all the things… so maybe, just maybe…

andrei-a-papou commented 5 months ago

Oh, this seems easy to do

I spoke too soon: the completion in this case should be limited to search bar only. It doesn't make sense in "Edit task" or "New task" dialogs, for example.

How about this: 80-filename-completion-searchbar.diff.gz

andrei-a-papou commented 5 months ago

And here's a patch to support highlighting {file} in task list: 81-filename-highlighting.diff.gz

vonshednob commented 5 months ago

Added! Thanks a lot for amazing help and your time to making pter better :grinning:

andrei-a-papou commented 5 months ago

Sure thing!