add the following lines to your bash_profile or zsh_rc or your equivelent terminal startup file.
export SUBLIME_PATH="path/to/your/subl"
export EDITOR=/path/to/sublw.sh
Mitmproxy will execute sublw
script with a path to the file that contains the text to edit.
Once the script had exited it will read the content from the file thus replacing it.
When subl
is called it starts another thread so we have to wrap this call and block till the file is saved. For that im using
fswatch
a great cross-platform file change monitor. You can find more details about fswatch
here
Amazing 👍