mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Use built-in open_command function for omz shop
Co-authored-by: mcornella <1441704+mcornella@users.noreply.github.com>
This commit is contained in:
parent
a5d33b5bbc
commit
b9b4036958
1 changed files with 1 additions and 15 deletions
16
lib/cli.zsh
16
lib/cli.zsh
|
|
@ -729,21 +729,7 @@ function _omz::shop {
|
|||
_omz::log info "Opening Oh My Zsh shop in your browser..."
|
||||
_omz::log info "$shop_url"
|
||||
|
||||
# Try to open the URL in a browser
|
||||
# Check for common commands to open URLs
|
||||
if (( $+commands[xdg-open] )); then
|
||||
xdg-open "$shop_url" 2>/dev/null
|
||||
elif (( $+commands[open] )); then
|
||||
open "$shop_url" 2>/dev/null
|
||||
elif (( $+commands[start] )); then
|
||||
start "$shop_url" 2>/dev/null
|
||||
elif (( $+commands[cygstart] )); then
|
||||
cygstart "$shop_url" 2>/dev/null
|
||||
elif (( $+commands[wslview] )); then
|
||||
wslview "$shop_url" 2>/dev/null
|
||||
else
|
||||
_omz::log info "Please open the URL above in your browser."
|
||||
fi
|
||||
open_command "$shop_url"
|
||||
}
|
||||
|
||||
function _omz::reload {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue