tmux-plugins / tpm

Tmux Plugin Manager
MIT License
11.9k stars 417 forks source link

Can I use `set-option` in a plugin? #240

Closed joshmedeski closed 1 year ago

joshmedeski commented 1 year ago

I'm trying to set a tmux option with my own custom plugin.

#!/usr/bin/env bash

CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set-option -g automatic-rename-format "#($CURRENT_DIR/bin/tmux-nerd-font-window-name #{pane_current_command})"

This does not work, tmux doesn't honor the set-option. Is this a limitation with tpm? Or have I done something wrong?

p.s. The same configuration works correctly when I have all of this setup manually in my .tmux.conf file.

alx-sychev commented 1 year ago

Try to call tmux as console command: tmux set-option -g ...

joshmedeski commented 1 year ago

That did it, thanks!