Created
September 1, 2020 12:43
-
-
Save XOlegator/937a971da170205d2d51bb38f11ce482 to your computer and use it in GitHub Desktop.
Xdebug URL handler for Sublime Text and PhpStorm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# For PhpStorm | |
REGEX="^xdebug://(.*):(.*)$" | |
if [[ $1 =~ $REGEX ]]; then | |
/snap/bin/phpstorm --line "${BASH_REMATCH[2]}" "${BASH_REMATCH[1]}" | |
exit 0 | |
fi | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# For Sublime Text | |
request=${1:7} | |
/opt/sublime_text/sublime_text $request |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment