Merge pull request #4217 from mcornella/standard-open-command

Implement and use a standard, cross-platform open command
This commit is contained in:
Robby Russell committed 2015-08-12 21:14:27 -07:00
commit b8dbd9bfba
7 files changed
+27 -44

No files matched your search

+16
View File
@@ -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.
#