about summary refs log tree commit diff stats
path: root/commands/msg
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2021-01-30 11:33:31 +0100
committerReto Brunner <reto@labrat.space>2021-01-30 14:04:23 +0100
commit949781fa0a5f0654112b4f78558347ca991a89d3 (patch)
tree1d8d58e66b567709ed746654ceb92d75667557b4 /commands/msg
parent9385827cae7bab6534933718d21eeb489448c476 (diff)
downloadaerc-949781fa0a5f0654112b4f78558347ca991a89d3.tar.gz
Refactor lib/open to accept user provided arguments
* Get rid of open_darwin
	It just lead to code duplication for a simple one string change.
	Instead we query it during initialization
* Accept user provided arguments
	"open" on MacOS accepts things like -A to use a specific application
	Pass trough arguments the user provided in order to facilitate this
* Refactor the function to a struct
	This makes it more convenient for the caller and avoids signatures like
	lib.OpenFile(nil, u.String(), nil) which are fairly unreadable
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/unsubscribe.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/msg/unsubscribe.go b/commands/msg/unsubscribe.go
index 205a255..cf3e4a8 100644
--- a/commands/msg/unsubscribe.go
+++ b/commands/msg/unsubscribe.go
@@ -119,6 +119,5 @@ func unsubscribeMailto(aerc *widgets.Aerc, u *url.URL) error {
 }
 
 func unsubscribeHTTP(u *url.URL) error {
-	lib.OpenFile(u.String(), nil)
-	return nil
+	return lib.NewXDGOpen(u.String()).Start()
 }
-12-26 21:00:40 -0500 committer Thomas E. Dickey <dickey@invisible-island.net> 1998-12-26 21:00:40 -0500 snapshot of project "lynx", label v2-8-2dev_12' href='/ingrix/lynx-snapshots/commit/WWW/Library/Implementation/HTDOS.c?id=8bccca15371c1bee770ef51f389a915b4ef4e417'>8bccca15 ^
349da2fb ^

1d80538b ^
349da2fb ^
1d80538b ^

349da2fb ^
1d80538b ^

45f1aadc ^
1d80538b ^
a2a1ab1e ^
8bccca15 ^
a2a1ab1e ^
e4409c40 ^
a2a1ab1e ^















0f88481e ^
a2a1ab1e ^




8bccca15 ^


a2a1ab1e ^




e4409c40 ^
f78e2771 ^

8bccca15 ^
f78e2771 ^
e4409c40 ^
a2e94617 ^
8bccca15 ^

a2e94617 ^
8bccca15 ^
a2e94617 ^
e4409c40 ^
8bccca15 ^
1d80538b ^


349da2fb ^

1d80538b ^
349da2fb ^
1d80538b ^

349da2fb ^
1d80538b ^
d3f9d547 ^
349da2fb ^
a2a1ab1e ^



c68ecb8b ^
8bccca15 ^
e4409c40 ^
c68ecb8b ^
f78e2771 ^









e4409c40 ^
c68ecb8b ^


e4409c40 ^
8bccca15 ^
e4409c40 ^
a2e94617 ^

c68ecb8b ^


8bccca15 ^

a2a1ab1e ^
c68ecb8b ^

d70fdcf7 ^
c68ecb8b ^

a2a1ab1e ^
c68ecb8b ^
a2a1ab1e ^



a2a1ab1e ^
a2a1ab1e ^
c68ecb8b ^






a2a1ab1e ^
c68ecb8b ^

e4409c40 ^
a2a1ab1e ^
4525eb4b ^







































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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193