Skip to content

Commit deecf5a

Browse files
committed
need to escape some characters that can occur in a url
1 parent f2da2c5 commit deecf5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-it-on.plugin.zsh

100755100644
+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ __open() {
1010
if [ "$(uname -s)" = "Darwin" ]; then
1111
open "$1" 2> /dev/null
1212
elif if $IN_WSL; then
13-
cmd.exe /c "start $1"
13+
# for cmd.exe, need to use ^ to escape the following: ()%!^"<>&|
14+
cmd.exe /c "start $(echo "$1" | sed "s~\([\(\)%\!^\"<>&|]\)~\^\1~g")"
1415
else
1516
xdg-open "$1" &> /dev/null
1617
fi

0 commit comments

Comments
 (0)