ofirgall / tmux-window-name

A plugin to name your tmux windows smartly.
MIT License
213 stars 22 forks source link

not renaming when starting tmux #36

Open Morette opened 7 months ago

Morette commented 7 months ago

plugin is not renaming pane when tmux is starting, I need to create another pane and switch

this is the log right after entering tmux tmux version: 3.4

➜ cat /tmp/tmux-window-name
DEBUG - rename_session_windows.py:328 main() Args: Namespace(print_programs=False, enable_rename_hook=True, disable_rename_hook=False, post_restore=False)
DEBUG - rename_session_windows.py:329 main() Options: Options(shells=['bash', 'fish', 'sh', 'zsh'], dir_programs=['nvim', 'vim', 'vi', 'git'], ignored_programs=[], max_name_len=20, use_tilde=False, substitute_sets=[('.+ipython([32])', 'ipython\\g<1>'), ('^(/usr)?/bin/(.+)', '\\g<2>'), ('(bash) (.+)/(.+[ $])(.+)', '\\g<3>\\g<4>')], dir_substitute_sets=[], show_program_args=True, log_level='DEBUG')
DEBUG - rename_session_windows.py:328 main() Args: Namespace(print_programs=False, enable_rename_hook=True, disable_rename_hook=False, post_restore=False)
DEBUG - rename_session_windows.py:329 main() Options: Options(shells=['bash', 'fish', 'sh', 'zsh'], dir_programs=['nvim', 'vim', 'vi', 'git'], ignored_programs=[], max_name_len=20, use_tilde=False, substitute_sets=[('.+ipython([32])', 'ipython\\g<1>'), ('^(/usr)?/bin/(.+)', '\\g<2>'), ('(bash) (.+)/(.+[ $])(.+)', '\\g<3>\\g<4>')], dir_substitute_sets=[], show_program_args=True, log_level='DEBUG')

and after creating another pane and doing switch

➜ cat /tmp/tmux-window-name
DEBUG - rename_session_windows.py:328 main() Args: Namespace(print_programs=False, enable_rename_hook=True, disable_rename_hook=False, post_restore=False)
DEBUG - rename_session_windows.py:329 main() Options: Options(shells=['bash', 'fish', 'sh', 'zsh'], dir_programs=['nvim', 'vim', 'vi', 'git'], ignored_programs=[], max_name_len=20, use_tilde=False, substitute_sets=[('.+ipython([32])', 'ipython\\g<1>'), ('^(/usr)?/bin/(.+)', '\\g<2>'), ('(bash) (.+)/(.+[ $])(.+)', '\\g<3>\\g<4>')], dir_substitute_sets=[], show_program_args=True, log_level='DEBUG')
DEBUG - rename_session_windows.py:328 main() Args: Namespace(print_programs=False, enable_rename_hook=True, disable_rename_hook=False, post_restore=False)
DEBUG - rename_session_windows.py:329 main() Options: Options(shells=['bash', 'fish', 'sh', 'zsh'], dir_programs=['nvim', 'vim', 'vi', 'git'], ignored_programs=[], max_name_len=20, use_tilde=False, substitute_sets=[('.+ipython([32])', 'ipython\\g<1>'), ('^(/usr)?/bin/(.+)', '\\g<2>'), ('(bash) (.+)/(.+[ $])(.+)', '\\g<3>\\g<4>')], dir_substitute_sets=[], show_program_args=True, log_level='DEBUG')
DEBUG - rename_session_windows.py:328 main() Args: Namespace(print_programs=False, enable_rename_hook=False, disable_rename_hook=False, post_restore=False)
DEBUG - rename_session_windows.py:329 main() Options: Options(shells=['bash', 'fish', 'sh', 'zsh'], dir_programs=['nvim', 'vim', 'vi', 'git'], ignored_programs=[], max_name_len=20, use_tilde=False, substitute_sets=[('.+ipython([32])', 'ipython\\g<1>'), ('^(/usr)?/bin/(.+)', '\\g<2>'), ('(bash) (.+)/(.+[ $])(.+)', '\\g<3>\\g<4>')], dir_substitute_sets=[], show_program_args=True, log_level='DEBUG')
DEBUG - rename_session_windows.py:236 rename_windows() panes_with_programs=[]
DEBUG - rename_session_windows.py:237 rename_windows() panes_with_dir=[Pane(info=Pane(%0 Window(@0 1:zsh, Session($0 main))), program=None), Pane(info=Pane(%1 Window(@1 2:zsh, Session($0 main))), program=None)]
DEBUG - rename_session_windows.py:257 rename_windows() get_exclusive_paths result, input: panes_with_dir=[Pane(info=Pane(%0 Window(@0 1:zsh, Session($0 main))), program=None), Pane(info=Pane(%1 Window(@1 2:zsh, Session($0 main))), program=None)], output: exclusive_paths=[(Pane(info=Pane(%0 Window(@0 1:zsh, Session($0 main))), program=None), PosixPath('thiago')), (Pane(info=Pane(%1 Window(@1 2:zsh, Session($0 main))), program=None), PosixPath('thiago'))]
DEBUG - rename_session_windows.py:265 rename_windows() processing exclusive_path: display_path=thiago p.program=None
DEBUG - rename_session_windows.py:291 substitute_name() substituting thiago
DEBUG - rename_session_windows.py:205 rename_window() renaming window_id=@0 to window_name=thiago
DEBUG - rename_session_windows.py:208 rename_window() shortened name window_name=thiago
DEBUG - rename_session_windows.py:265 rename_windows() processing exclusive_path: display_path=thiago p.program=None
DEBUG - rename_session_windows.py:291 substitute_name() substituting thiago
DEBUG - rename_session_windows.py:205 rename_window() renaming window_id=@1 to window_name=thiago
DEBUG - rename_session_windows.py:208 rename_window() shortened name window_name=thiago