@@ -33,7 +33,7 @@ def command_debug_info(
3333
3434 def prepend_tab (strings : t .List [str ]) -> t .List [str ]:
3535 """Prepend tab to strings in list."""
36- return ["\t %s" % x for x in strings ]
36+ return [f "\t { x } " for x in strings ]
3737
3838 def output_break () -> str :
3939 """Generate output break."""
@@ -52,33 +52,37 @@ def format_tmux_resp(std_resp: tmux_cmd) -> str:
5252
5353 output = [
5454 output_break (),
55- "environment:\n %s"
56- % "\n " .join (
57- prepend_tab (
58- [
59- "dist: %s" % platform .platform (),
60- "arch: %s" % platform .machine (),
61- "uname: %s" % "; " .join (platform .uname ()[:3 ]),
62- "version: %s" % platform .version (),
63- ],
64- ),
55+ "environment:\n {}" .format (
56+ "\n " .join (
57+ prepend_tab (
58+ [
59+ f"dist: { platform .platform ()} " ,
60+ f"arch: { platform .machine ()} " ,
61+ "uname: {}" .format ("; " .join (platform .uname ()[:3 ])),
62+ f"version: { platform .version ()} " ,
63+ ],
64+ ),
65+ )
6566 ),
6667 output_break (),
67- "python version: %s" % " " .join (sys .version .split ("\n " )),
68- "system PATH: %s" % os .environ ["PATH" ],
69- "tmux version: %s" % get_version (),
70- "libtmux version: %s" % libtmux_version ,
71- "tmuxp version: %s" % __version__ ,
72- "tmux path: %s" % shutil .which ("tmux" ),
73- "tmuxp path: %s" % tmuxp_path ,
74- "shell: %s" % os .environ ["SHELL" ],
68+ "python version: {}" . format ( " " .join (sys .version .split ("\n " ) )),
69+ "system PATH: {}" . format ( os .environ ["PATH" ]) ,
70+ f "tmux version: { get_version ()} " ,
71+ f "libtmux version: { libtmux_version } " ,
72+ f "tmuxp version: { __version__ } " ,
73+ "tmux path: {}" . format ( shutil .which ("tmux" ) ),
74+ f "tmuxp path: { tmuxp_path } " ,
75+ "shell: {}" . format ( os .environ ["SHELL" ]) ,
7576 output_break (),
76- "tmux sessions:\n %s" % format_tmux_resp (tmux_cmd ("list-sessions" )),
77- "tmux windows:\n %s" % format_tmux_resp (tmux_cmd ("list-windows" )),
78- "tmux panes:\n %s" % format_tmux_resp (tmux_cmd ("list-panes" )),
79- "tmux global options:\n %s" % format_tmux_resp (tmux_cmd ("show-options" , "-g" )),
80- "tmux window options:\n %s"
81- % format_tmux_resp (tmux_cmd ("show-window-options" , "-g" )),
77+ "tmux sessions:\n {}" .format (format_tmux_resp (tmux_cmd ("list-sessions" ))),
78+ "tmux windows:\n {}" .format (format_tmux_resp (tmux_cmd ("list-windows" ))),
79+ "tmux panes:\n {}" .format (format_tmux_resp (tmux_cmd ("list-panes" ))),
80+ "tmux global options:\n {}" .format (
81+ format_tmux_resp (tmux_cmd ("show-options" , "-g" ))
82+ ),
83+ "tmux window options:\n {}" .format (
84+ format_tmux_resp (tmux_cmd ("show-window-options" , "-g" ))
85+ ),
8286 ]
8387
8488 tmuxp_echo ("\n " .join (output ))
0 commit comments