summaryrefslogtreecommitdiff
path: root/lib/functions.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/functions.zsh')
-rw-r--r--lib/functions.zsh16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh
index 2a962669c..efb73a1bd 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -15,6 +15,22 @@ function take() {
cd $1
}
+function open_command() {
+ local open_cmd
+
+ # define the open command
+ case "$OSTYPE" in
+ darwin*) open_cmd="open" ;;
+ cygwin*) open_cmd="cygstart" ;;
+ linux*) open_cmd="xdg-open" ;;
+ *) echo "Platform $OSTYPE not supported"
+ return 1
+ ;;
+ esac
+
+ nohup $open_cmd "$@" &>/dev/null
+}
+
#
# Get the value of an alias.
#