macostmux

Why are my tmux plugins not working on MacOS even after restarting the session?


I installed tmux 3.3a using homebrew in my Mac (Ventura 13.4 OS). I installed tpm by cloning from https://github.com/tmux-plugins/tpm. I've added a theme plugin and reloaded the ~/.tmux.conf file. I installed all the plugins with (prefix + I). I killed the exisiting tmux server and started a new one, yet I don't see my theme loaded or any of other plugins working.

I'm attaching screenshot of my plugin installation (I didn't see any error there either)

Here is my .tmux.conf -

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'fabioluciano/tmux-tokyo-night'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-logging'

### Tokyo Night Theme configuration
set -g @theme_variation 'moon'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

tpm plugin installation -

tmux plugin installation

Can someone help me with this?

This might feel like duplicate question but I tried all solutions. I tried killing the server and session instead of just exiting. I tried loading the config file from both inside and outside the tmux session, still the same. I deleted all plugins and installed them again assuming if previous installation went wrong but no change.


Solution

  • I took a look at tmux-tokyo-night's source code and noticed it's using Bash's declare -A to define associative arrays. declare -A is a new feature in Bash v4.0 but macOS' Bash is still at v3.2. I'm using Homebrew's Bash v5.2 so it works for me.

    To fix it:

    1. Install latest Bash with Homebrew: brew install bash
    2. Update PATH var in your bashrc (or other shell rc if you are not using Bash) and make sure Homebrew's path (/usr/local/bin) comes before /bin (macOS' Bash is at /bin/bash).
    3. Restart your terminal app to load your updated bashrc
    4. Run bash --version to confirm it's v5.2+.
    5. Quit old tmux sessoions and start a new one.

    Note that you need to use patched font to correctly display some special chars/icons.

    enter image description here