mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Update shop URLs from Planet Argon to OpenSwag and add omz shop command
Co-authored-by: robbyrussell <257+robbyrussell@users.noreply.github.com>
This commit is contained in:
parent
76427e7d2f
commit
a5d33b5bbc
4 changed files with 28 additions and 3 deletions
|
|
@ -547,7 +547,7 @@ We're on social media:
|
||||||
## Merchandise
|
## Merchandise
|
||||||
|
|
||||||
We have
|
We have
|
||||||
[stickers, shirts, and coffee mugs available](https://shop.planetargon.com/collections/oh-my-zsh?utm_source=github)
|
[stickers, shirts, and coffee mugs available](https://openswag.shop/collections/oh-my-zsh?utm_source=github)
|
||||||
for you to show off your love of Oh My Zsh. Again, you will become the talk of the town!
|
for you to show off your love of Oh My Zsh. Again, you will become the talk of the town!
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
||||||
25
lib/cli.zsh
25
lib/cli.zsh
|
|
@ -28,6 +28,7 @@ function _omz {
|
||||||
'plugin:Manage plugins'
|
'plugin:Manage plugins'
|
||||||
'pr:Manage Oh My Zsh Pull Requests'
|
'pr:Manage Oh My Zsh Pull Requests'
|
||||||
'reload:Reload the current zsh session'
|
'reload:Reload the current zsh session'
|
||||||
|
'shop:Open the Oh My Zsh shop'
|
||||||
'theme:Manage themes'
|
'theme:Manage themes'
|
||||||
'update:Update Oh My Zsh'
|
'update:Update Oh My Zsh'
|
||||||
'version:Show the version'
|
'version:Show the version'
|
||||||
|
|
@ -173,6 +174,7 @@ Available commands:
|
||||||
plugin <command> Manage plugins
|
plugin <command> Manage plugins
|
||||||
pr <command> Manage Oh My Zsh Pull Requests
|
pr <command> Manage Oh My Zsh Pull Requests
|
||||||
reload Reload the current zsh session
|
reload Reload the current zsh session
|
||||||
|
shop Open the Oh My Zsh shop
|
||||||
theme <command> Manage themes
|
theme <command> Manage themes
|
||||||
update Update Oh My Zsh
|
update Update Oh My Zsh
|
||||||
version Show the version
|
version Show the version
|
||||||
|
|
@ -721,6 +723,29 @@ function _omz::pr::test {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _omz::shop {
|
||||||
|
local shop_url="https://openswag.shop/collections/oh-my-zsh"
|
||||||
|
|
||||||
|
_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
|
||||||
|
}
|
||||||
|
|
||||||
function _omz::reload {
|
function _omz::reload {
|
||||||
# Delete current completion cache
|
# Delete current completion cache
|
||||||
command rm -f $_comp_dumpfile $ZSH_COMPDUMP
|
command rm -f $_comp_dumpfile $ZSH_COMPDUMP
|
||||||
|
|
|
||||||
|
|
@ -505,7 +505,7 @@ print_success() {
|
||||||
printf '\n'
|
printf '\n'
|
||||||
printf '%s\n' "• Follow us on X: $(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
printf '%s\n' "• Follow us on X: $(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
||||||
printf '%s\n' "• Join our Discord community: $(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
printf '%s\n' "• Join our Discord community: $(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
||||||
printf '%s\n' "• Get stickers, t-shirts, coffee mugs and more: $(fmt_link "Planet Argon Shop" https://shop.planetargon.com/collections/oh-my-zsh)"
|
printf '%s\n' "• Get stickers, t-shirts, coffee mugs and more: $(fmt_link "OpenSwag Shop" https://openswag.shop/collections/oh-my-zsh)"
|
||||||
printf '%s\n' $FMT_RESET
|
printf '%s\n' $FMT_RESET
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ if LANG= git pull --quiet --rebase $remote $branch; then
|
||||||
printf "${BLUE}%s${RESET}\n\n" "$message"
|
printf "${BLUE}%s${RESET}\n\n" "$message"
|
||||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "To keep up with the latest news and updates, follow us on X:" "$(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
printf "${BLUE}${BOLD}%s %s${RESET}\n" "To keep up with the latest news and updates, follow us on X:" "$(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
||||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Want to get involved in the community? Join our Discord:" "$(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Want to get involved in the community? Join our Discord:" "$(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
||||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Get your Oh My Zsh swag at:" "$(fmt_link "Planet Argon Shop" https://shop.planetargon.com/collections/oh-my-zsh)"
|
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Get your Oh My Zsh swag at:" "$(fmt_link "OpenSwag Shop" https://openswag.shop/collections/oh-my-zsh)"
|
||||||
elif [[ $verbose_mode == minimal ]]; then
|
elif [[ $verbose_mode == minimal ]]; then
|
||||||
printf "${BLUE}%s${RESET}\n" "$message"
|
printf "${BLUE}%s${RESET}\n" "$message"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue