summarylogtreecommitdiffstats
path: root/xdg-open.sh
diff options
context:
space:
mode:
authorYidaozhan Ya2022-12-29 21:47:55 +0800
committerYidaozhan Ya2022-12-29 21:47:55 +0800
commitf7cd5d607b63cb6efb60e51be93479970be88363 (patch)
treed535a0c9e66cff7c93197d2b6fa5ee7a8e91e53d /xdg-open.sh
parent9e363bd7b2daa4487b010bd2c8edd0e523a5975d (diff)
downloadaur-f7cd5d607b63cb6efb60e51be93479970be88363.tar.gz
[fix] xdg-open 相关的兼容性问题
Diffstat (limited to 'xdg-open.sh')
-rwxr-xr-xxdg-open.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/xdg-open.sh b/xdg-open.sh
new file mode 100755
index 000000000000..76bdf56f14c2
--- /dev/null
+++ b/xdg-open.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+URI_TO_OPEN="$1"
+
+if [ "${URI_TO_OPEN:0:4}" == "http" ]; then
+ /snapd-xdg-open "$URI_TO_OPEN"
+else
+ /real-xdg-open "$URI_TO_OPEN"
+fi