aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2023-01-21 09:16:41 +0800
committerGuangxiong Lin <[email protected]>2023-01-21 09:16:41 +0800
commit662b5f11b76f5eb1ea825bf2efb74beeca20e916 (patch)
treef70cde833e84d1016ad664e06c349fbe7671e055 /bin
parentc0ed6641a1180147cdd922316706673e77c7a962 (diff)
downloaddotfiles-662b5f11b76f5eb1ea825bf2efb74beeca20e916.tar.gz
dotfiles-662b5f11b76f5eb1ea825bf2efb74beeca20e916.tar.bz2
dotfiles-662b5f11b76f5eb1ea825bf2efb74beeca20e916.zip
Make open command as binary
Diffstat (limited to 'bin')
-rwxr-xr-xbin/open9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/open b/bin/open
new file mode 100755
index 0000000..f5dd273
--- /dev/null
+++ b/bin/open
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+if [ -f /usr/bin/xdg-open ]; then
+ nohup xdg-open "$*" > /dev/null 2>&1 &
+elif [ -f /usr/bin/open ]; then
+ /usr/bin/open "$*"
+else
+ echo "No usable program is found"
+fi