Repository navigation
feat(config): add open_only to make --open-only the default for listings - #389
Merged
Merged
Conversation
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.
#384 made the default listings include closed items that Things hasn't logged yet. This adds an
open_onlyconfig key, so a setup that wants the older output can have it by default.Behaviour
open_only = trueseeds--open-onlyon thelistcommand only (things today,things inbox, a barethings, and so on). It is scoped the same wayassume_yesis scoped tocompleteandcancel.--open-only=falseoverrides it for one call. Kong already accepts=falseon bool flags;--json=falseworks the same way.--include-completedalso overrides it. It sits in anxorgroup with--open-only, so without this kong would refuse to combine it with a value that came from the file. A newYieldsTofield onconfig.Keystops the resolver supplyingopen_onlywhen that flag is on the command line.logbookandtrashignore the setting. A--open-onlytyped on the command line is still rejected there, as before.--open-only=falsewhen that override was used, because the re-run reads the same config file.Checked with the built binary
I used a temp config with
open_only = trueagainst the live database, plus a probe to-do added to Today, completed, and trashed afterwards:things todaythings today --open-only=false[x]things today --include-completedthings today, no configthings logbookthings logbook --open-only--open-only is not supported on the "logbook" viewthings config showlistsopen_only true config.Docs
configuration.md(key table, template,config showsample, valid-keys example, scoped keys, agent notes),commands.md,agents.md,README.mdandinternal/skill/SKILL.md.make testandmake lintpass.