浏览代码

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
Marc Cornellà 6 天之前
父节点
当前提交
b5d52682ca
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/dash/dash.plugin.zsh

+ 1 - 1
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() {