feat: add --default-only option to show-lists - #32
Merged
Merged
Conversation
Cherry-picked from keith/reminders-cli#88 (7a15c00edc).
…t id The cherry-picked `--default-only` printed only the list title and ignored `--format`, and force-unwrapped the default calendar. Route it through the regular `showLists` output instead, so plain output is `Title (identifier)` like every other list and `--format json` works. Exit with a message instead of crashing when no default list is configured.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
reminders show-lists --default-only(short-d), which prints only the list Reminders.app uses for new reminders.Cherry-picked from upstream keith/reminders-cli#88 by Aaron Fields (
7a15c00edc), plus a follow-up commit of ours.Important
Merge this PR with a merge commit, not squash. Squashing would demote the original author of the cherry-picked commit to a co-author trailer.
Commits
feat: add --default-only option to show-lists(author: Aaron Fields). The upstream commit, applied cleanly; only the commit message was amended to a conventional title.feat: make show-lists --default-only honor --format and print the list id(ours). The upstream version printed only the title, ignored--format, and force-unwrapped the default calendar. It now goes through the regularshowListspath, so plain output isTitle (identifier)and--format jsonworks. If no default list is configured it prints a message and exits 1 instead of crashing. README example added.Verification
swift build -Xswiftc -warnings-as-errorsandswift test -Xswiftc -warnings-as-errorspass.show-lists --default-onlyin plain and JSON format on a real account.