Redundant hooks? E.g. What's the difference between after-new-session and session-created?

14 views
Skip to first unread message

Richard Redlon

unread,
Sep 1, 2021, 12:37:07 PM9/1/21
to tmux-...@googlegroups.com
I've looked around the manual and can't seem to find a difference between using:

`set-hook -g after-new-session[10] somecommand`

and 

`set-hook -g session-created[10] somecommand`


It's not just these: as the man page says, most commands have an after-commandname hook and there's what I'm calling the "noun-verb" hooks " (e.g. `session-created`) listed under the HOOKS section.
When would you use an after-hook instead of its corresponding noun-verb hook?

Nicholas Marriott

unread,
Sep 1, 2021, 3:46:27 PM9/1/21
to Richard Redlon, tmux-users
You can use either, it won't make any difference. There is no way to create a session except with new-session.


--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAGmUSVeREmxq5ZZHNkusppkzhPukL9W%3Dm7O8QD2edMh2ojtMiA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages