Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting keyconfig.edit causes "Duplicate Key Error" #579

Open
1 task done
BeCracked opened this issue May 16, 2024 · 4 comments
Open
1 task done

Setting keyconfig.edit causes "Duplicate Key Error" #579

BeCracked opened this issue May 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@BeCracked
Copy link

Describe the bug

Having the option uda.taskwarrior-tui.keyconfig.edit=h set to anything causes the error [taskwarrior-tui error]: Duplicate keys found in key config. Having uda.taskwarrior-tui.keyconfig.edit= "works" however.

This only occurred after updating yesterday. I probably updated from version v0.25.4 to the lastest.

To Reproduce

Steps to reproduce the behavior:

  • Have the line uda.taskwarrior-tui.keyconfig.edit=h in the .taskrc. (Tested with test data setup and just no data and otherwise empty .taskrc.

.taskrc:

uda.taskwarrior-tui.keyconfig.edit=h

Environment:

  • Operating System: macOS 14.4.1
  • Installation: homebrew
  • taskwarrior-tui version:
taskwarrior-tui --version
taskwarrior-tui 0.26.3
  • task version:
task --version
3.0.2

Additional context and information

No stacktrace is generated as timewarrior-tui does not crash but error out cleanly, I suppose.

@BeCracked BeCracked added the bug Something isn't working label May 16, 2024
@kdheepak
Copy link
Owner

Do you have any additional key configurations?

It's annoying because I don't show which keyconfigs are duplicated:

Err(anyhow!("Duplicate keys found in key config"))

I'll fix this in a upcoming release and leave this issue to track it.

@BeCracked
Copy link
Author

BeCracked commented May 16, 2024

I was using it with quite a number of other keybinds (IIRC I simply copied all available from here). I did not try every permutation, but it works when I comment the edit line. As described, I also used it with only that one line in the .taskrc and it still caused the error.

This is the Taskwarrior TUI part of my .taskrc.

# Taskwarrior-tui Keys config
uda.taskwarrior-tui.keyconfig.quit=q
uda.taskwarrior-tui.keyconfig.refresh=r
uda.taskwarrior-tui.keyconfig.go-to-bottom=G
uda.taskwarrior-tui.keyconfig.go-to-top=g
uda.taskwarrior-tui.keyconfig.down=e
uda.taskwarrior-tui.keyconfig.up=i
uda.taskwarrior-tui.keyconfig.page-down=E
uda.taskwarrior-tui.keyconfig.page-up=I
uda.taskwarrior-tui.keyconfig.delete=x
uda.taskwarrior-tui.keyconfig.done=d
uda.taskwarrior-tui.keyconfig.start-stop=s
uda.taskwarrior-tui.keyconfig.quick-tag=t
uda.taskwarrior-tui.keyconfig.undo=u
#uda.taskwarrior-tui.keyconfig.edit=h # Buggy? "Duplicate entry"
uda.taskwarrior-tui.keyconfig.modify=m
uda.taskwarrior-tui.keyconfig.shell=!
uda.taskwarrior-tui.keyconfig.log=l
uda.taskwarrior-tui.keyconfig.add=a
uda.taskwarrior-tui.keyconfig.annotate=A
uda.taskwarrior-tui.keyconfig.filter=/
uda.taskwarrior-tui.keyconfig.zoom=z
uda.taskwarrior-tui.keyconfig.context-menu=c
uda.taskwarrior-tui.keyconfig.next-tab=]
uda.taskwarrior-tui.keyconfig.previous-tab=[

taskwarrior works as normal btw.

@BeCracked
Copy link
Author

BeCracked commented May 16, 2024

I do not know much rust, but I would wager that this commit 5c543f7 might have caused the bug by adding this line.
Which also would make this ever so slightly out of date, I guess :D

Btw, I accidentally already discovered the functionality introduced by that commit. Very handy!

Thanks for the quick reply either way! :)

@RedEtherbloom
Copy link
Collaborator

Issue should be solved by our PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants