mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-08-09 23:07:56 +02:00
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:
@ -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"
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user