aboutsummaryrefslogtreecommitdiff
path: root/.config/fish
diff options
context:
space:
mode:
authorkj-sh6042024-07-17 22:39:50 -0400
committerkj-sh6042024-07-17 22:39:50 -0400
commit233063640eccfe59cf86503d4c71d11cfb5e00c0 (patch)
tree4406feecaa53bc0549fbfeee12007c5de57dcd69 /.config/fish
parent70532272be7010f2480f39cf0b9e2038b8cdfef7 (diff)
feat: `fish_open_override.fish`
Diffstat (limited to '.config/fish')
-rw-r--r--.config/fish/functions/fish_open_override.fish19
1 files changed, 19 insertions, 0 deletions
diff --git a/.config/fish/functions/fish_open_override.fish b/.config/fish/functions/fish_open_override.fish
new file mode 100644
index 0000000..1e5e58f
--- /dev/null
+++ b/.config/fish/functions/fish_open_override.fish
@@ -0,0 +1,19 @@
+function open
+ if command -v xdg-open > /dev/null
+ xdg-open $argv
+ return
+ end
+
+ if test (uname) = "Darwin"
+ command open $argv
+ return
+ end
+
+ if test (uname) = "Haiku"
+ command open $argv
+ return
+ end
+
+ echo "error: could not detect the open command for your system."
+ return 1
+end