summaryrefslogtreecommitdiff
path: root/lib/functions.zsh
diff options
context:
space:
mode:
authorAndrew Janke <andrew@apjanke.net>2015-08-31 13:29:54 -0400
committerAndrew Janke <andrew@apjanke.net>2015-09-03 12:50:55 -0400
commit82c76f6b5c2718622a532fb759231e8d24171413 (patch)
treeb0126f6d9b3ed508c1a6d9b21df56e2523e0555f /lib/functions.zsh
parentfe92ea98e0633784508e85d6b756b1c3f667b2a4 (diff)
parentba5fd57c1ff4a8523715bab6acc35dbbeff88af7 (diff)
downloadzsh-82c76f6b5c2718622a532fb759231e8d24171413.tar.gz
zsh-82c76f6b5c2718622a532fb759231e8d24171413.tar.bz2
zsh-82c76f6b5c2718622a532fb759231e8d24171413.zip
Merge changes from #4241 into installer-portable-colors
Conflicts: tools/install.sh tools/upgrade.sh
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 17f5f9cbf..0d632a268 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.
#