Bug Report
backit opened this issue · comments
Diagnostic output
jrnl: v4.0.1
Python: 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
OS: Linux 6.1.0-13-amd64
Current Behavior
Using tab to autocomplete tags shows wrong behaviour. The tag used is tagtest and this is the wrong output:
myuser@mymachine:~$ jrnl @tag┏━━━━━━━━━━━━━━━━━━━━━━┓
┃ 1978 entries found ┃
┗━━━━━━━━━━━━━━━━━━━━━━┛
test
it shows a right result tag-->test but the output is broken
Expected Behavior
on pressing tab should shows on new line all tags that complete string.
Repro Steps
write substring for tags and press tab
Debug output
debug output is the same
Other Information
Using debian 12, installed with pipx. The behaviour was right on debian 11, but i had to reinstall when upgrading to debian 12 and then was broken
Hi @backit, this tab completion actually isn't a feature of jrnl, but was likely a script you created or found when you first set up jrnl, and it's acting differently now that jrnl's output has changed a little. You can see some examples of that script in the open issue #618.
Newer versions of jrnl send the number of entries found in a search to STDERR, which is why this message is coming up. In your completion script, you can probably fix this by changing a pipe (|
) after a jrnl
call from |
to |&
which would have your script parse this "entries found" message, and hopefully end up ignoring it because it doesn't match the structure of the report of all tags in the jrnl.
I'm going to close this as "won't fix" since we already have an open issue for adding this as an enhancement (#618), but feel free to let us know if that helps, or if you have any questions about how this works.