1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#[test]
fn clients_parse() {
use crate::Clients;
use std::str::FromStr;
let client0_vec = vec![
// client_activity
#[cfg(feature = "tmux_1_6")]
"1707508743",
// client_cell_height
#[cfg(feature = "tmux_3_1")]
"0",
// client_cell_width
#[cfg(feature = "tmux_3_1")]
"0",
// client_activity_string
#[cfg(all(feature = "tmux_1_6", not(feature = "tmux_2_2")))]
"",
// client_created
#[cfg(feature = "tmux_1_6")]
"1707479629",
// client_created_string
#[cfg(all(feature = "tmux_1_6", not(feature = "tmux_2_2")))]
"",
// client_control_mode
#[cfg(feature = "tmux_2_1")]
"0",
// client_discarded
#[cfg(feature = "tmux_2_1")]
"0",
// client_flags:attached,focused,UTF-8
// client_cwd
#[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
"",
// client_termfeatures:bpaste,ccolour,clipboard,cstyle,focus,title
// client_height
#[cfg(feature = "tmux_1_6")]
"65",
// client_key_table
#[cfg(feature = "tmux_2_2")]
"root",
// client_last_session
#[cfg(feature = "tmux_1_8")]
"",
// client_name
#[cfg(feature = "tmux_2_4")]
"/dev/pts/0",
// client_pid
#[cfg(feature = "tmux_2_1")]
"32150",
// client_prefix
#[cfg(feature = "tmux_1_8")]
"0",
// client_readonly
#[cfg(feature = "tmux_1_6")]
"0",
// client_session
#[cfg(feature = "tmux_1_8")]
"0",
// client_termname
#[cfg(feature = "tmux_1_6")]
"xterm-256color",
// client_termtype
#[cfg(all(feature = "tmux_2_4", not(feature = "tmux_3_1")))]
"",
// client_uid:1000
// client_user:anton
// client_tty
#[cfg(feature = "tmux_1_6")]
"/dev/pts/0",
// client_utf8
#[cfg(feature = "tmux_1_6")]
"1",
// client_width
#[cfg(feature = "tmux_1_6")]
"177",
// client_written
#[cfg(feature = "tmux_2_4")]
"193354",
];
let client1_vec = vec![
// client_activity
#[cfg(feature = "tmux_1_6")]
"1707508743",
// client_cell_height
#[cfg(feature = "tmux_3_1")]
"0",
// client_cell_width
#[cfg(feature = "tmux_3_1")]
"0",
// client_activity_string
#[cfg(all(feature = "tmux_1_6", not(feature = "tmux_2_2")))]
"",
// client_created
#[cfg(feature = "tmux_1_6")]
"1707479629",
// client_created_string
#[cfg(all(feature = "tmux_1_6", not(feature = "tmux_2_2")))]
"",
// client_control_mode
#[cfg(feature = "tmux_2_1")]
"0",
// client_discarded
#[cfg(feature = "tmux_2_1")]
"0",
// client_flags:attached,focused,UTF-8
// client_cwd
#[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
"",
// client_termfeatures:bpaste,ccolour,clipboard,cstyle,focus,title
// client_height
#[cfg(feature = "tmux_1_6")]
"65",
// client_key_table
#[cfg(feature = "tmux_2_2")]
"root",
// client_last_session
#[cfg(feature = "tmux_1_8")]
"",
// client_name
#[cfg(feature = "tmux_2_4")]
"/dev/pts/0",
// client_pid
#[cfg(feature = "tmux_2_1")]
"32150",
// client_prefix
#[cfg(feature = "tmux_1_8")]
"0",
// client_readonly
#[cfg(feature = "tmux_1_6")]
"0",
// client_session
#[cfg(feature = "tmux_1_8")]
"0",
// client_termname
#[cfg(feature = "tmux_1_6")]
"xterm-256color",
// client_termtype
#[cfg(all(feature = "tmux_2_4", not(feature = "tmux_3_1")))]
"",
// client_uid:1000
// client_user:anton
// client_tty
#[cfg(feature = "tmux_1_6")]
"/dev/pts/0",
// client_utf8
#[cfg(feature = "tmux_1_6")]
"1",
// client_width
#[cfg(feature = "tmux_1_6")]
"177",
// client_written
#[cfg(feature = "tmux_2_4")]
"193354",
];
let client0_str = client0_vec.join(":");
let client1_str = client1_vec.join(":");
let clients_str = format!("{}\n{}", client0_str, client1_str);
let clients = Clients::from_str(&clients_str).unwrap();
dbg!(clients);
}