[x] Add support for BETTER_ERRORS_EDITOR env var, which is used instead of EDITOR if present.
[x] Add %{file_unencoded} replacement to editor formatting string, so when a URL needs to be unencoded, it doesn't require a Proc.
[x] Add support for BETTER_ERRORS_EDITOR_URL env var, which allows the editor to be fully customized without modifying code.
[x] Add support for BETTER_ERRORS_VIRTUAL_PATH and BETTER_ERRORS_HOST_PATH which, used together, cause the virtual path to be stripped from file paths, and the host path to be prefixed.
This refactors editor detection out of the BetterErrors class into a new Editor class, while preserving the call pattern on BetterErrors.editor=.
BETTER_ERRORS_EDITOR
env var, which is used instead ofEDITOR
if present.%{file_unencoded}
replacement to editor formatting string, so when a URL needs to be unencoded, it doesn't require a Proc.BETTER_ERRORS_EDITOR_URL
env var, which allows the editor to be fully customized without modifying code.BETTER_ERRORS_VIRTUAL_PATH
andBETTER_ERRORS_HOST_PATH
which, used together, cause the virtual path to be stripped from file paths, and the host path to be prefixed.This refactors editor detection out of the
BetterErrors
class into a newEditor
class, while preserving the call pattern onBetterErrors.editor=
.