Add flag similar to `--short` but filter the entry body for the search term
Author: DanaKirshCreated Oct 10, 2024Updated Nov 29, 2025
Labelsenhancement:pushpin:
Use Case/Motivation
On days out I often write a long list of things I've done as one entry, somewhere in the middle the entry might include @movie or @show tags with the movie or show I went to see. I often like to filter my journal for all the movies or shows I've seen, but using --short only includes the title of the entry e.g. "day in town" rather than "Beetlejuice @movie"
Example Usage
If my journal is
[24-05-2023 10:00] New York day 12
Got a train to Penn station
Visited central synagogue
Empire state building
Harry potter and the cursed child Broadway @show in the Lyric Theatre (won ticket lottery)
[11-01-2024 09:00] Prague day 4
11:00 tour of the Clementinum
Visited the Jewish cemetery
Went to see Carmen @opera @show at the Prague State Opera
[06-10-2024 13:13] London day out
Walked around the shops
The Comedy of Errors @show at Shakespeare's Globe
Lunch at Pizza place @eat-outRunning jrnl -contains @show --short currently produces:
[24-05-2023 10:00] New York day 12
[11-01-2024 09:00] Prague day 4
[06-10-2024 13:13] London day outI'd like a command that produces jrnl -contains @show --relevant-short:
[24-05-2023 10:00] Harry potter and the cursed child Broadway @show in the Lyric Theatre (won ticket lottery)
[11-01-2024 09:00] Went to see Carmen @opera @show at the Prague State Opera
[06-10-2024 13:13] The Comedy of Errors @show at Shakespeare's GlobeIt might be worth considering an option that inputs both the title and the relevant line in the entry jrnl --contains @show --compact:
[24-05-2023 10:00] New York day 12
Harry potter and the cursed child Broadway @show in the Lyric Theatre (won ticket lottery)
[11-01-2024 09:00] Prague day 4
Went to see Carmen @opera @show at the Prague State Opera
[06-10-2024 13:13] London day out
The Comedy of Errors @show at Shakespeare's GlobeOther Information
Related to this closed issue #384
Source: jrnl-org/jrnl