[tmux] Automatically rename sessions

This commit is contained in:
2025-08-13 21:25:17 -06:00
parent 25a1afa317
commit 01081d25c7

View File

@@ -0,0 +1,5 @@
# Automatically rename new sessions to the basename of the current directory
set-hook -g session-created 'run-shell "tmux rename-session -t #{session_name} $(basename #{pane_current_path})"'
# Also rename when attaching to a session (optional)
set-hook -g client-session-changed 'run-shell "tmux rename-session -t #{session_name} $(basename #{pane_current_path})"'