This commit is contained in:
2016-02-21 23:01:14 +03:00
parent 330a1440af
commit 2bd0bb8bfd
4 changed files with 31 additions and 2 deletions

View File

@ -1,5 +1,30 @@
# web_search from terminal
function open_command() {
emulate -L zsh
setopt shwordsplit
local open_cmd
# define the open command
case "$OSTYPE" in
darwin*) open_cmd='open' ;;
cygwin*) open_cmd='cygstart' ;;
linux*) open_cmd='xdg-open' ;;
msys*) open_cmd='start ""' ;;
*) echo "Platform $OSTYPE not supported"
return 1
;;
esac
# don't use nohup on OSX
if [[ "$OSTYPE" == darwin* ]]; then
$open_cmd "$@" &>/dev/null
else
nohup $open_cmd "$@" &>/dev/null
fi
}
function web_search() {
emulate -L zsh