@@ -1067,18 +1067,27 @@ def command_ls():
10671067@cli .command (name = 'debug-info' , short_help = 'Print out all diagnostic info' )
10681068def command_debug_info ():
10691069 """
1070+ Print debug info to submit with Issues.
10701071 """
10711072
10721073 def prepend_tab (strings ):
10731074 """
1075+ Prepend tab to strings in list.
10741076 """
10751077 return list (map (
10761078 lambda x : '\t %s' % x ,
10771079 strings
10781080 ))
10791081
1082+ def generate_output_break ():
1083+ """
1084+ Generate output break.
1085+ """
1086+ return '-' * 25
1087+
10801088 def format_tmux_resp (std_resp ):
10811089 """
1090+ Format tmux command response for tmuxp stdout.
10821091 """
10831092 return '\n ' .join ([
10841093 * prepend_tab (std_resp .stdout ),
@@ -1089,6 +1098,14 @@ def format_tmux_resp(std_resp):
10891098 ])
10901099
10911100 output = [
1101+ generate_output_break (),
1102+ 'environment:\n %s' % '\n ' .join (prepend_tab ([
1103+ 'system: %s' % os .uname ().sysname ,
1104+ 'arch: %s' % os .uname ().machine ,
1105+ 'os: {0} {1}' .format (os .uname ().nodename , os .uname ().version ),
1106+ 'kernel: %s' % os .uname ().release ,
1107+ ])),
1108+ generate_output_break (),
10921109 'python version: %s' % ' ' .join (sys .version .split ('\n ' )),
10931110 'system PATH: %s' % os .environ ['PATH' ],
10941111 'tmux version: %s' % get_version (),
@@ -1097,6 +1114,7 @@ def format_tmux_resp(std_resp):
10971114 'tmux path: %s' % which ('tmux' ),
10981115 'tmuxp path: %s' % tmuxp_path ,
10991116 'shell: %s' % os .environ ['SHELL' ],
1117+ generate_output_break (),
11001118 'tmux sessions:\n %s' % format_tmux_resp (
11011119 tmux_cmd ('list-sessions' )
11021120 ),
0 commit comments