1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-21 13:20:07 +00:00

fix(dash): urlencode special parameters like : in query (#12811)

In macOS, using queries such as `dash php:enum` does not open Dash.app,
possibly due to colon character being interpreted as a port.

URL-encoding the parameter (: -> %3A) makes this work again.

Fixes https://discord.com/channels/642496866407284746/809850042575093760/1308076125456437300
This commit is contained in:
Marc Cornellà 2024-11-19 15:43:04 +01:00 committed by GitHub
parent ca5471fe49
commit b5d52682ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
# Usage: dash [keyword:]query # Usage: dash [keyword:]query
dash() { open -a Dash.app dash://"$*" } dash() { open -a Dash.app "dash://$(omz_urlencode -r $*)" }
compdef _dash dash compdef _dash dash
_dash() { _dash() {