timewarrior
timewarrior copied to clipboard
Tab completion cuts hyphenated tags
When there are hyphenated tags, the tab completion only completes to the first hyphen, and the rest of the tag is missing.
Demonstration:
[09:55:42] ❯ timew start main-unit
Note: '"main-unit"' is a new tag.
Tracking "main-unit"
Started 2023-12-12T09:55:42
Current 42
Total 0:00:00
[09:55:45] ❯ timew stop
Recorded "main-unit"
Started 2023-12-12T09:55:42
Ended 45
Total 0:00:03
[09:55:52] ❯ timew start secondary-unit
Note: '"secondary-unit"' is a new tag.
Tracking "secondary-unit"
Started 2023-12-12T09:55:52
Current 52
Total 0:00:00
[09:55:55] ❯ timew stop
Recorded "secondary-unit"
Started 2023-12-12T09:55:52
Ended 55
Total 0:00:03
[09:55:57] ❯ timew tags
Tag Description
main-unit -
secondary-unit -
[09:56:00] ❯ fish
❯ timew start [TAB]
main secondary
- Shell: Fish 3.6.1
- Timewarrior: 1.6.0 and 1.7.0
@Igetin For completeness: Which version of Timewarrior are you using?
@Igetin For completeness: Which version of Timewarrior are you using?
Sorry, I thought I added that information to the post, but maybe I removed it by accident. 😅 I’m using the latest release (1.6.0). It’s installed via the distro package manager (DNF/Fedora). My shell is Fish 3.6.1.
Edit: I also tested that this is reproducible with the default Fish configuration and without any plugins installed.
@Igetin The good news is that this issue is already fixed with 3e66ee19, so it will be part of the next Timewarrior release.
However, I found another issue (👉🏻 #576) while investigating this, which I also want to fix. Should not take that long, but please be patient. 🙂
I have now updated Timewarrior, but the problem is still reproducible with the steps mentioned in the thread opener.
- Fish version: 3.6.1
- Timewarrior version: 1.7.0
@lauft Can this be reopened? This is still reproducable on Timewarrior 1.7.1 / Fish 3.7.0.
@Igetin can you let me know if this if this fix solves your issue? https://github.com/pfmephisto/timew-fishcompletion/pull/3
@Igetin can you let me know if this if this fix solves your issue? pfmephisto/timew-fishcompletion#3
I tried the updated completion script, it seems now that there's a weird thing where it adds seemingly unrelated symbols after each tab entry? When I type timew start
and press tab twice, this is how it looks:
root@e9bfbde733f6 /# timew start another-project\ \ca
another-project ␁ project ␁
Same thing as an image:
So the prompt is appended with \ \ca
, and the entries in the tab completion list are appended with ␁
(start of heading)…
This is with a fresh install of Fedora 40 / Timewarrior 1.7.1 / Fish 3.7.0.
Another issue I noticed is that the completion does not suggest new tags that have been added in the current shell session. Newly added tags are only suggested by the completion after starting a new shell session.
@pfmephisto can you investigate once again? 🙇🏻
I will. Just need to find the time to recreate the issue and look in to it.
I've submitted a pull request to fix this. I'm no AWK wizard, but it seems to work for me. I also tested with tags that contain spaces. I'd like someone else to verify it's working on their end as well.
@Igetin Thanks @lauft The pull request is merged