You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jrnl: v3.3
Python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
OS: Linux 5.15.0-101-generic
Current Behavior
Using the -and flag with multiple instances of -contains only displays entries containing the second term, not both as expected. For instance jrnl -contains "term 1" -and -contains "term 2" gives results containing term 2 not term 1 and term 2.
Expected Behavior
What I would like to do is search for multiple words contained in the same entries.
Repro Steps
Search for contents with multiple instances of the -contains flag along with the -and flag.
>jrnl foo
>jrnl bar
>jrnl foo bar
>jrnl -contains foo -contains bar
┏━━━━━━━━━━━━━━━━━━━┓
┃ 2 entries found ┃
┗━━━━━━━━━━━━━━━━━━━┛
2024-05-07 06:05:28 PM bar
2024-05-07 06:05:29 PM foo bar
Expected only the last entry, not the first.
OR, if we expect an "or" behavior without -and, then we should see all three entries. I'm happy to open that to discussion. Either way, the current behavior isn't expected.
Diagnostic output
jrnl: v3.3
Python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
OS: Linux 5.15.0-101-generic
Current Behavior
Using the -and flag with multiple instances of -contains only displays entries containing the second term, not both as expected. For instance
jrnl -contains "term 1" -and -contains "term 2"
gives results containing term 2 not term 1 and term 2.Expected Behavior
What I would like to do is search for multiple words contained in the same entries.
Repro Steps
Search for contents with multiple instances of the -contains flag along with the -and flag.
Debug output
DEBUG root Parsed args: Namespace(debug=True, preconfig_cmd=None, postconfig_cmd=None, filename=None, on_date=None, today_in_history=False, month=None, day=None, year=None, start_date=None, end_date=None, contains=None, strict=False, starred=False, limit=None, excluded=[], edit=False, delete=False, change_time=None, export=False, tags=False, short=False, config_override=[], config_file_path='', text=[])
DEBUG root Reading configuration from file /home/allen/.config/jrnl/jrnl.yaml
DEBUG root Using configuration "{'colors': {'body': 'none', 'date': 'blue', 'tags': 'green', 'title': 'yellow'}, 'default_hour': 12, 'default_minute': 0, 'editor': 'gvim -f', 'encrypt': False, 'highlight': True, 'indent_character': '|', 'journals': {'default': {'encrypt': False, 'journal': '/home/allen/Documents/journal.md'}, 's': '/home/allen/Documents/notes/snippets/snip.txt'}, 'linewrap': 75, 'tagsymbols': '#@', 'template': False, 'timeformat': '%F %r', 'version': 'v3.3'}"
DEBUG root Using journal name: default
DEBUG root Updating configuration with specific journal overrides {'encrypt': False, 'journal': '/home/allen/Documents/journal.md'}
DEBUG root opened PlainJournal with 188 entries
DEBUG root Write mode: starting
DEBUG root Write mode: opening editor
DEBUG root Write mode: loading template for entry
DEBUG root Write mode: no template configured
Other Information
No response
The text was updated successfully, but these errors were encountered: