diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-08-31 13:29:54 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-09-03 12:50:55 -0400 |
commit | 82c76f6b5c2718622a532fb759231e8d24171413 (patch) | |
tree | b0126f6d9b3ed508c1a6d9b21df56e2523e0555f /lib/functions.zsh | |
parent | fe92ea98e0633784508e85d6b756b1c3f667b2a4 (diff) | |
parent | ba5fd57c1ff4a8523715bab6acc35dbbeff88af7 (diff) | |
download | zsh-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.zsh | 16 |
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. # |