public
Last active

Sublime Text ubuntu xdebug url handler

  • Download Gist
mimeapps.list
1 2 3 4
#~/.local/share/applications/mimeapps.list
[Added Associations]
#...
x-scheme-handler/subl=subl-urlhandler.desktop
subl-urlhandler.desktop
1 2 3 4 5 6 7 8 9 10 11 12
#/usr/share/applications/subl-urlhandler.desktop
[Desktop Entry]
Version=1.0
Name=Sublime Text 2
Name[en_PH]=Sublime Text 2
Exec=xdebug-urlhandler %u
Icon=/opt/subl/Icon/48x48/sublime_text.png
Terminal=false
Type=Application
Categories=Development;
StartupNotify=true
MimeType=x-scheme-handler/subl;
xdebug-urlhandler
Shell
1 2 3 4 5 6 7
#!/bin/bash
#/usr/bin/xdebug-urlhandler
url=$1
file=${url#subl*//}
path=`expr "$file" : '\(.*\)\?@'`
line=${file#*@}
subl $path:$line

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.