summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-10-22 16:32:02 -0400
committerJune McEnroe <june@causal.agency>2018-10-22 16:32:02 -0400
commit1164db0ba8564d273a4d46e5d1af6baa6e2f54a0 (patch)
treec72c9477a3a3cd55ee3ddbd57c2b7fe587dc59b3
parentRework status line (diff)
downloadcatgirl-1164db0ba8564d273a4d46e5d1af6baa6e2f54a0.tar.gz
catgirl-1164db0ba8564d273a4d46e5d1af6baa6e2f54a0.zip
Add more URL schemes
-rw-r--r--url.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/url.c b/url.c
index a398778..b62baba 100644
--- a/url.c
+++ b/url.c
@@ -24,9 +24,19 @@
 #include "chat.h"
 
 static const char *Schemes[] = {
-	"https:",
-	"http:",
+	"cvs:",
 	"ftp:",
+	"git:",
+	"http:",
+	"https:",
+	"irc:",
+	"ircs:",
+	"magnet:",
+	"sftp:",
+	"ssh:",
+	"svn:",
+	"telnet:",
+	"vnc:",
 };
 static const size_t SchemesLen = sizeof(Schemes) / sizeof(Schemes[0]);
 
@@ -81,8 +91,7 @@ void urlOpenMatch(struct Tag tag, const char *substr) {
 		struct Entry entry = ringEntry(i);
 		if (!entry.url || entry.tag != tag.id) continue;
 		if (!strstr(entry.url, substr)) continue;
-		char *argv[] = { "open", entry.url, NULL };
-		eventPipe(argv);
+		eventPipe((char *[]) { "open", entry.url, NULL });
 		break;
 	}
 }