diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-08-17 20:59:39 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-08-17 20:59:39 -0400 |
commit | 00eb4658304b010afdfa87f74be673c8aced4961 (patch) | |
tree | 3d9e7f95f21265c3c60f10cdca720308bb2421c6 /lib/functions.zsh | |
parent | 47d19cc56425aa7c550d845726111ee8bd9520d1 (diff) | |
parent | 192de6bcffb0294e19f4203f6f7dc1a7f3e427be (diff) | |
download | zsh-00eb4658304b010afdfa87f74be673c8aced4961.tar.gz zsh-00eb4658304b010afdfa87f74be673c8aced4961.tar.bz2 zsh-00eb4658304b010afdfa87f74be673c8aced4961.zip |
Merge branch 'master' into fold-terminalapp-plugin-into-termsupport
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 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. # |