Skip to content

Commit 324b537

Browse files
committed
adding system info to debug-info and updating issues_template
1 parent 8f24fd2 commit 324b537

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

.github/issue_template.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,10 @@
22
* For general technical questions, problems or feature requests related to the code **in this repository** file an issue.
33

44
### Step 2: Provide tmuxp details
5-
* Python version
6-
* system PATH
7-
* tmux version
8-
* tmuxp version
9-
* tmux path
10-
* tmuxp path,
11-
* libtmux version
12-
* shell
13-
* output of `tmux list-sessions`, `tmux list-windows`, `tmux list-panes`
14-
* output of `tmux show-options -g`, `tmux show-window-options -g`
15-
* output of `tmuxp freeze <SESSION_NAME>`
5+
* Include output of `tmuxp debug-info`
6+
* Include any other pertinant system info not captured
167

17-
### Step 3: Describe your environment
18-
* Architecture: _____
19-
* OS version: _____
20-
21-
### Step 4: Describe the problem:
8+
### Step 3: Describe the problem:
229
#### Steps to reproduce:
2310
1. _____
2411
2. _____

tmuxp/cli.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,18 +1067,27 @@ def command_ls():
10671067
@cli.command(name='debug-info', short_help='Print out all diagnostic info')
10681068
def 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

Comments
 (0)