about summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-07-02 18:21:34 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-04 10:58:33 -0400
commit1bb1a8015659e0cfde45be9fe9440dbb254680cf (patch)
tree4ee9e875ed33f9d851a71c26d5a721c9ea4e9b59 /lib
parent687f1d8c1a31176c3d94e1c4f9049f011cd339ad (diff)
downloadaerc-1bb1a8015659e0cfde45be9fe9440dbb254680cf.tar.gz
Use "open" instead of "xdg-open" on Darwin systems
Diffstat (limited to 'lib')
-rw-r--r--lib/open.go12
-rw-r--r--lib/open_darwin.go10
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/open.go b/lib/open.go
new file mode 100644
index 0000000..ad6533e
--- /dev/null
+++ b/lib/open.go
@@ -0,0 +1,12 @@
+// +build !darwin
+
+package lib
+
+import (
+	"os/exec"
+)
+
+func OpenFile(filename string) error {
+	cmd := exec.Command("xdg-open", filename)
+	return cmd.Run()
+}
diff --git a/lib/open_darwin.go b/lib/open_darwin.go
new file mode 100644
index 0000000..0ffd9a1
--- /dev/null
+++ b/lib/open_darwin.go
@@ -0,0 +1,10 @@
+package lib
+
+import (
+	"os/exec"
+)
+
+func OpenFile(filename string) error {
+	cmd := exec.Command("open", filename)
+	return cmd.Run()
+}
ik/mu/commit/cpp/termbox/bytebuffer.inl?h=main&id=9a31c34f0f2aab901be29e0844ae2fcb9b3f4a13'>9a31c34f ^
5f128523 ^
9a31c34f ^



5f128523 ^


9a31c34f ^

5f128523 ^


9a31c34f ^
5f128523 ^


9a31c34f ^


5f128523 ^


9a31c34f ^
5f128523 ^


9a31c34f ^

5f128523 ^


9a31c34f ^
a6defa54 ^
9a31c34f ^
5f128523 ^


9a31c34f ^






5f128523 ^
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