pimutils / todoman

✅ A simple, standards-based, cli todo (aka: task) manager.
https://todoman.readthedocs.io
ISC License
482 stars 76 forks source link

Subcommand to get current configuration parameters #543

Closed johnjameswhitman closed 9 months ago

johnjameswhitman commented 9 months ago

I'm trying to work on some fish completions for todoman, and in order to get the list displaynames you need to basically do something like cat ~/.local/share/calendars/*/displayname; however, there's no guarantee the user stores their calendars there.

I noticed the ZSH completions inspect the default-config-file location for the path setting, but figure it might be useful to be able to do something like todo config get {setting} to be able to load this at runtime. You can do something similar with pip, which comes in handy.

Later, if #129 ever got implemented you could do other subcommands like todo config set.

johnjameswhitman commented 9 months ago

Following up on this: it looks like the click library that todoman depends on actually lets you generate completions, so I will probably end up using that.

_TODO_COMPLETE=fish_source todo > ~/.config/fish/completions/todo.fish

https://click.palletsprojects.com/en/8.1.x/shell-completion/