Use standard open command in current plugins

Substitutes the current duplicate logic for the standard
and cross-platform function open_command in plugins:

  frontend-search, jira, node, web-search
This commit is contained in:
Marc Cornellà
2015-08-05 00:32:57 +02:00
parent 2d0bfcf818
commit d1d06b5675
4 changed files with 7 additions and 40 deletions

View File

@ -2,14 +2,6 @@
function frontend() {
# get the open command
local open_cmd
if [[ $(uname -s) == 'Darwin' ]]; then
open_cmd='open'
else
open_cmd='xdg-open'
fi
# no keyword provided, simply show how call methods
if [[ $# -le 1 ]]; then
echo "Please provide a search-content and a search-term for app.\nEx:\nfrontend <search-content> <search-term>\n"
@ -113,7 +105,7 @@ function frontend() {
echo "$url"
$open_cmd "$url"
open_command "$url"
}