insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.33k stars 314 forks source link

Add search option to `agenda` subcommand; deprecate `search` subcommand #816

Open michaelmhoffman opened 2 weeks ago

michaelmhoffman commented 2 weeks ago

813 revealed some confusion on using the search command when really agenda is a better use case. I'm certain the opposite happens as well.

Both of these subcommands are wrappers to GoogleCalendarInterface._display_queried_events(), and both accept start and end positions. Having one agenda subcommand with an option for search that could be used or not would be more ergonomic, simpler to explain, and would eliminate a problem of discoverability and a growing number of subcommands.

Furthermore, having two different subcommands causes duplication of interface code and documentation. Additional options (such as feature request #685) would require either further duplication of code or making the options available for only one of the two commands.

Suggested implementation plan:

  1. implement search option for agenda; mark search as deprecated, have it generate a DeprecationWarning
  2. subsequent release: remove search
dbarnett commented 2 weeks ago

+1, I'm totally in favor of consolidating down to fewer top-level commands.