Closed Allaman closed 5 months ago
Hi, this is the expected behavior. prepend_keymap
is used to prepend items to the keymap, so the items appearing earlier have higher priority (matched first). Therefore, you can simply:
[[manager.prepend_keymap]]
on = [ "d", "d" ]
run = ['''
shell --confirm 'trash-put "$@"'
''']
desc = "Move the files to the trash"
without the need to unbind d
, as it has been covered by d => d
and will never match. Let me know if it works for you!
Hi, thank you again for your kind reply. I read the docs about precedence, but apparently, I did something wrong. Oddly, that works 😆
I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
What system are you running Yazi on?
macOS
What terminal are you running Yazi in?
kitty 0.33.0
Did you try the latest code to see if this problem got fixed?
Not tried, and I'll explain why below
yazi --debug
outputDescribe the bug
Sorry about the headline, I couldn't think of anything better.
I want to unbind
d
as trash command and bind it todd
(sorry, blame my muscle memory 😆 )My approach is like so
However, it does not work. I guess by mapping
d
to "noop" yazi ignores all following keystrokes and mappings?Expected Behavior
Hitting
dd
triggers the configured run commandTo Reproduce
see above toml snippet
Configuration
see above toml snippet
Anything else?
No response