mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01: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:
parent
2d0bfcf818
commit
d1d06b5675
4 changed files with 7 additions and 40 deletions
|
|
@ -1,13 +1,5 @@
|
|||
# Open the node api for your current version to the optional section.
|
||||
# TODO: Make the section part easier to use.
|
||||
function node-docs {
|
||||
# get the open command
|
||||
local open_cmd
|
||||
if [[ "$OSTYPE" = darwin* ]]; then
|
||||
open_cmd='open'
|
||||
else
|
||||
open_cmd='xdg-open'
|
||||
fi
|
||||
|
||||
$open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
|
||||
open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue