Leader key variable substitution flakey
Description
In the current main version, my custom leader key config doesn't work, failing with
[leader.n]
context = ["$change_id"]
help = "Conventional Commit"
send = [ "$", "jjdi $change_id", "enter"]
/bin/bash: line 1: change_id: command not found
jjui: press enter to continue...
this however still works:
[leader.n]
context = ["$change_id"]
help = "Conventional Commit"
send = [ "$", "jjdi \"$change_id\" ", "enter"]
Note the extra quotes and the trailing space. Without the trailing space, the final quote is ignored, and the script fails with mismatched quotes.
Specifications
- Platform: fish and bash
- Version: v0.9.4-0.20251007080218-5ef8eb8e7894
Hey thanks for the report.
Let me see what I can do but Leader and custom commands are going away in the next release so I prefer investing time into getting next version ready rather fixing these at the moment.
Yeah, the behavior is actually very odd. It seems my workaround doesn't work consistently which makes me think there is some kind of race condition that might be hard to track down.
hey @idursun @jscarrott
since there's no plan to get this fixed, i updated the wiki instead to avoid confusion https://github.com/idursun/jjui/wiki/Leader-Key/34a7ef95bf58b2c5f2e97b5c127658309e5771e9