summaryrefslogtreecommitdiff
path: root/plugins/web-search
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2015-08-12 21:14:27 -0700
committerRobby Russell <robby@planetargon.com>2015-08-12 21:14:27 -0700
commitb8dbd9bfba261cde572a9cd196dc057719862a6d (patch)
tree34887e6b187a29887dde97f113bc0a681df17267 /plugins/web-search
parent4c1eda114d982ff5f7f7adc396f24c25d3f639d0 (diff)
parentb760a10cb27e5e17ad32e51ffac3374334fa4888 (diff)
downloadzsh-b8dbd9bfba261cde572a9cd196dc057719862a6d.tar.gz
zsh-b8dbd9bfba261cde572a9cd196dc057719862a6d.tar.bz2
zsh-b8dbd9bfba261cde572a9cd196dc057719862a6d.zip
Merge pull request #4217 from mcornella/standard-open-command
Implement and use a standard, cross-platform open command
Diffstat (limited to 'plugins/web-search')
-rw-r--r--plugins/web-search/web-search.plugin.zsh12
1 files changed, 1 insertions, 11 deletions
diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
index d407edb96..7c3ad9046 100644
--- a/plugins/web-search/web-search.plugin.zsh
+++ b/plugins/web-search/web-search.plugin.zsh
@@ -14,16 +14,6 @@ function web_search() {
github "https://github.com/search?q="
)
- # 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
-
# check whether the search engine is supported
if [[ -z "$urls[$1]" ]]; then
echo "Search engine $1 not supported."
@@ -41,7 +31,7 @@ function web_search() {
url="${(j://:)${(s:/:)urls[$1]}[1,2]}"
fi
- nohup $open_cmd "$url" &>/dev/null
+ open_command "$url"
}