mirror of
https://github.com/arcan1s/dotfiles.git
synced 2025-07-13 13:55:49 +00:00
fixes
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user