jimeh / tmux-themepack

A pack of various Tmux themes.
1.65k stars 204 forks source link

Add reset themes #58

Open joslinpr opened 3 months ago

joslinpr commented 3 months ago

The themes use set -goq. From the man page:

  If -g is given, the global session or window option is set.
 ...
  The -o flag prevents setting an option that is already set and the -q flag suppresses errors about unknown or ambiguous options.

As a result, once a theme is set, you cannot change it. This PR creates two themes for developers. The "reset.tmuxtheme" uses set -gq, so that it overrides existing variables. The "reset-debug.tmuxtheme" uses set -g, so that variables are overridden, and error messages are not suppressed.

Steps to demonstrate the problem: Load a theme, then load a second theme. The values of the first theme remain.

An alternate enhancement would be to use set -gq in all themes. I do not know why goq was chosen, so I have not changed those themes.