Skip to content

Commit 36d5e9f

Browse files
committed
adding system info to debug-info and updating issues_template
1 parent 63f797d commit 36d5e9f

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
@@ -1211,18 +1211,27 @@ def command_ls():
12111211
@cli.command(name='debug-info', short_help='Print out all diagnostic info')
12121212
def command_debug_info():
12131213
"""
1214+
Print debug info to submit with Issues.
12141215
"""
12151216

12161217
def prepend_tab(strings):
12171218
"""
1219+
Prepend tab to strings in list.
12181220
"""
12191221
return list(map(
12201222
lambda x: '\t%s' % x,
12211223
strings
12221224
))
12231225

1226+
def generate_output_break():
1227+
"""
1228+
Generate output break.
1229+
"""
1230+
return '-' * 25
1231+
12241232
def format_tmux_resp(std_resp):
12251233
"""
1234+
Format tmux command response for tmuxp stdout.
12261235
"""
12271236
return '\n'.join([
12281237
*prepend_tab(std_resp.stdout),
@@ -1233,6 +1242,14 @@ def format_tmux_resp(std_resp):
12331242
])
12341243

12351244
output = [
1245+
generate_output_break(),
1246+
'environment:\n%s' % '\n'.join(prepend_tab([
1247+
'system: %s' % os.uname().sysname,
1248+
'arch: %s' % os.uname().machine,
1249+
'os: {0} {1}'.format(os.uname().nodename, os.uname().version),
1250+
'kernel: %s' % os.uname().release,
1251+
])),
1252+
generate_output_break(),
12361253
'python version: %s' % ' '.join(sys.version.split('\n')),
12371254
'system PATH: %s' % os.environ['PATH'],
12381255
'tmux version: %s' % get_version(),
@@ -1241,6 +1258,7 @@ def format_tmux_resp(std_resp):
12411258
'tmux path: %s' % which('tmux'),
12421259
'tmuxp path: %s' % tmuxp_path,
12431260
'shell: %s' % os.environ['SHELL'],
1261+
generate_output_break(),
12441262
'tmux sessions:\n%s' % format_tmux_resp(
12451263
tmux_cmd('list-sessions')
12461264
),

0 commit comments

Comments
 (0)