I want to write a hook in tmux to show a message that reports the config has been reloaded. Here is my code:
#binding a button to reload this config file bind r source-file ~/.tmux.conf #set hook to notify user when config file has been reloaded set-hook -g after-source-file 'display-message "Config reloaded"' I know that the hook does run because originally I wrote "echo 'Config reloaded'" and an error came up in the status bar about it being an unknown command.
Also I have included an example hook from here:
set-hook -g client-attached 'display-message "hello world"' Which displays the message on client attachment no problem, so I am confused why the source-file hook is an exception