Skip to content

tmux 3.0 - 3.2a doesn't fail when reading undefined options #59

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

Merged
merged 4 commits into from
Apr 3, 2025

Conversation

jaclu
Copy link
Owner

@jaclu jaclu commented Apr 3, 2025

tmux 3.0 - 3.2a exits 0 even if variable was not found when using show-options -gv, so the value being set to "" vs not being defined can't be detected via exit code for those versions.

The workaround is to use a show-options -g and grep for the option name. If it is found "" is accepted as intended value, otherwise the default is used.

@jaclu jaclu merged commit 758ced2 into main Apr 3, 2025
@jaclu jaclu deleted the old_tmux_booleans branch April 3, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant