diff options
| author | Marc Cornellà <marc@mcornella.com> | 2024-11-19 15:43:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-19 15:43:04 +0100 |
| commit | b5d52682cab844a5ffdc1b1f2ee80de561e0e6aa (patch) | |
| tree | c60e4d8ee22be594b9b26e11fd1194d2eaee1702 | |
| parent | ca5471fe496f00007727fd26db762d19519c2e8f (diff) | |
| download | zsh-b5d52682cab844a5ffdc1b1f2ee80de561e0e6aa.tar.gz zsh-b5d52682cab844a5ffdc1b1f2ee80de561e0e6aa.tar.bz2 zsh-b5d52682cab844a5ffdc1b1f2ee80de561e0e6aa.zip | |
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
| -rw-r--r-- | plugins/dash/dash.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/dash/dash.plugin.zsh b/plugins/dash/dash.plugin.zsh index f6801a870..9abd691c7 100644 --- a/plugins/dash/dash.plugin.zsh +++ b/plugins/dash/dash.plugin.zsh @@ -1,5 +1,5 @@ # Usage: dash [keyword:]query -dash() { open -a Dash.app dash://"$*" } +dash() { open -a Dash.app "dash://$(omz_urlencode -r $*)" } compdef _dash dash _dash() { |
