From 7814b1b3bf01f00e3949f3e1c23fc22028aaaa03 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 3 Feb 2018 02:15:19 -0600 Subject: [PATCH 1/4] fixed an problem with the url being encoded and phpstorm not being able to open it. --- phpstorm-url-handler | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpstorm-url-handler b/phpstorm-url-handler index 318f13c..e1e8c94 100755 --- a/phpstorm-url-handler +++ b/phpstorm-url-handler @@ -7,7 +7,8 @@ # @license GPL # @author Stefan Auditor -arg=${1} +urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } +arg=$(urldecode "${1}") pattern=".*file(:\/\/|\=)(.*)&line=(.*)" # Get the file path. From 91e3114b7358d1422326748d32bd94195bbfc2be Mon Sep 17 00:00:00 2001 From: "Michael S. Edwards" Date: Thu, 8 Apr 2021 09:29:32 -0500 Subject: [PATCH 2/4] added in server path replacement for docker/devilbox --- phpstorm-url-handler | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpstorm-url-handler b/phpstorm-url-handler index e1e8c94..048d625 100755 --- a/phpstorm-url-handler +++ b/phpstorm-url-handler @@ -10,13 +10,16 @@ urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } arg=$(urldecode "${1}") pattern=".*file(:\/\/|\=)(.*)&line=(.*)" +find="/shared/httpd/" +replace="/home/michael/public_html/"; + # Get the file path. file=$(echo "${arg}" | sed -r "s/${pattern}/\2/") - +file=$(echo "${file/${find}/${replace}}") # Get the line number. line=$(echo "${arg}" | sed -r "s/${pattern}/\3/") - + # Check if phpstorm|pstorm command exist. if type phpstorm > /dev/null; then /usr/bin/env phpstorm --line "${line}" "${file}" From 382187242c06d08b003583ca98fbe137aa0fdefd Mon Sep 17 00:00:00 2001 From: Michael Edwards Date: Mon, 8 Nov 2021 21:24:05 -0600 Subject: [PATCH 3/4] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 8341995..7477a94 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,14 @@ placing a link of the following kind in the markup: print "Open with PhpStorm"; ?> +Added in ability to path map to local files from docker/devilbox. + +Edit phpstorm-url-handler file, find the following lines: +find="/shared/httpd/" +replace="/home/michael/public_html/"; + +change the content of the find variable with the path the files are located on docker/devilbox, and change the content of the replace variable with the path to the local files. + ## Command-line usage FILE="/path/to/filename.php" From e45b49bf0f5939863eb75106ec797ae6da095b6d Mon Sep 17 00:00:00 2001 From: Michael Edwards Date: Tue, 9 Nov 2021 22:43:47 -0600 Subject: [PATCH 4/4] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7477a94..fe11b9d 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,10 @@ placing a link of the following kind in the markup: Added in ability to path map to local files from docker/devilbox. Edit phpstorm-url-handler file, find the following lines: -find="/shared/httpd/" -replace="/home/michael/public_html/"; + + find="/shared/httpd/" + + replace="/home/michael/public_html/"; change the content of the find variable with the path the files are located on docker/devilbox, and change the content of the replace variable with the path to the local files.