Nicholas,
Thanks for your quick reply.
The issue I raised last time is solved by this patch :)
Some keys on my keyboard are broken, and my alternate keys sometimes mislead me - sorry if I miss or add letters in my spelling.
Before asking the above question, I have submitted my first lua plugin improvement [tmux.nvim](
https://github.com/trailblazing/tmux.nvim) to github based on the original tmux 3.4. In order to support the switching of primary and secondary prefixes at will, I have to handle two sets of configurations at the same time, which is why I encountered the above problem. These days I upgraded this plugin based on your update to make it work with both versions of tmux. At present, it has been debugged and I will upload it later.
Before this tmux update, I used setenv in the conditional statement branch of tmux to avoid the subsequent branch from overwriting the variable definition in the previous branch. This bypass of complex parsing can only avoid confusion in the final definition (execution phase), but cannot avoid the cross-overlapping between environment variables detected during the parsing process. This can be very confusing for programmers -- I have to repeatedly paste the initialization code to make sure I understand which branch/scope the code block is currently in. In a real scenario, some corner bugs are difficult to track down. This is why a correct parsing process is important.
"variable assignment only looks at the most recent scope, so the test=6 is skipped but the inner ones are not"
According to this logic, the test program should get test==5, not test==6 (which is another point I'm worried about). After the update, it does get test==5 :) The test==5 in my test was added later, purely for testing purposes -- because the original tmux completely ignores the truth value of the conditional expression of the outer conditional statement -- this is unacceptable.
Anyway, the current upgrade meets my needs, thank you very much.
In this process, there is another point that I am more confused about: how to print the value of the variable during the parsing process?